It's like synthesizing a microcontroller inside the FPGA and then using it like a normal MCU. Microblaze requires a paid license to use though. Picoblaze is a 1st party 8-bit processor and is open source.
Echoing isn't too bad...you have to get into a hardware mindset rather than software mindset. I would think, that if the FPGA ran significantly faster than UART fast enough (which it probably will), you simply configure it to pass the state of the input pin to an output pin (and of course connect those pins appropriately to the TX and RX of a RS-232 driver. THe same as if you used just a piece of wire to loop the signal from the TX back to the RX. I don't think any UART IP core is really needed for your example.