The fix depends on what is actually going wrong.
Check your account name and password first. World of Warcraft accounts are now tied to Battle.net, so if you have not merged your account with a free Battle.net account, you will not get in. Instructions for merging are on the Battle.net site.
Make sure your router is running properly and, if the issue persists, contact your internet provider.
A banned account cannot log in at all. If your account is on trial, Blizzard normally sends an email explaining the situation.
Common causes of bans include illegal addons that cheat in-game, such as gold multipliers, bot modifiers, and item modifiers. Buying gold or paying someone to power level your character will also get you banned, and both require handing your account details to a third party, which is how a lot of accounts end up compromised. It is simply not worth it.
If none of that helps, visit Blizzard's site and use the support tab to find their contact address.