There are different ways depending on how you want the message to behave. For example, you can use
message() to show a basic popup with your message and an "Okay" button. You can use
UIErrorsFrame:AddMessage() if you just want to have text pop up in the middle of your screen. If you want to have text pop up at any determined spot, you'll need to set up a FontString and manage showing/hiding the text yourself.