The ~ is called a 'tilde' - you get it prefixed to your IdentD when you do not reply to the server's ident request. A lot of servers require you to have Ident enabled in order to connect. To get it enabled you often just need to type
/identd on IdentHere and then connect. However, if that is not working (which is often caused by firewalls/routers) then see
this thread.
You can also get to the IdentD options in mIRC via
ALT+O > Connect > Identd.
Regards,