TextPrintString(string,time,style) will simply print a string to the screen for as long as you specify in time (which expects time in seconds) and either on the top (style=1) or bottom (style=2) of the screen.
There's 2 places the text can be printed (top/bottom) and if you print to the same place twice, the old text will be replaced. So for example:
TextPrintString("You won't even see this",1,1)
TextPrintString("But you will see this",1,1)
because it'll just immediately get replaced by that second one. The game can only run (and so text can only be printed) when your script is waiting using Wait. That's why you use Wait(0) in loops, so the loop doesn't crash the game. Similarly for text if you want the game to wait a moment so your text can actually be seen, use Wait(ms) in between text.
TextPrintString("Text 1",1,1)
Wait(1000)
TextPrintString("Text 2",1,1)
However keep in mind using Wait will of course make your script wait and not be able to do anything for a short period of time. For example if you have something like this:
repeat
if IsButtonBeingPressed(3,0) then
TextPrintString("Give spudgun",1,1)
Wait(1000)
elseif IsButtonBeingPressed(6,0) then
PedSetActionNode(gPlayer,"/Global/Freaks/Mermaid/MermaidIdle","Act/Anim/FreakShow.act")
end
Wait(0)
until false
When you press button 3 the script will wait for an entire second before the script can run again, meaning there will be a whole second that your script isn't running and thus in that 1 second you will not be able to use that action node that we play when 6 is pressed.