Now here is where it will get slightly more difficult for me to explain. The reason this is, is that every device has its own interface from here. Some will need code, and others will take you though its program, step by step. Nethack is a game that you play.
One of the most easy thing to hack via telnet, is a Cisco router. All Cisco routers have a telnet server built in. To learn the Cisco "language" go to this website
When connected to a Cisco router you will get something similar to the picture below. Type "enable" and you can use the privileged mode. After entering privileged mode, type "config t" to configure the router.