The title says it all. Note that I'm using a non-US layout, Norwegian, so I can't create the Ctrl+] combination. I've found the trick before, but can't find it.
Not sure what layout you have, but for me in Finnish layout it is Ctrl + å.
Type Ctrl+] to enter the telnet menu, then enter
quit. For more commands, see
Edit: Haven't noticed that you can't type Ctrl+], but I would be surprised if there isn't a way to type that with every keyboard. But you can change the escape character with the commandline option
You can also use the command "set escape" followed by any key you want to set the escape character.
telnet> set escape ctrlp
I often don't remember the key-sequences... except at the telnet prompt this sequence works: telnet> quit
followed by the return key.