If you are banned, your account will give you a "Game ID Blocked by Game Master Staff" message when you attempt to log in. As we do not know which forum account belongs to which ingame account, you will not receive further information automatically.
If you get banned, your first priority should be to file a support ticket asking why you have been banned. You will likely receive a meaningful response with the reason after a short while ( ~1 day or so, depending on when the handling GM spots the ticket ).
The best thing to avoid getting banned is to simply not do anything that is against the rules in the first place.
( Do note: Sometimes innocent accounts are banned too which we call "freezing" a account. This happens when a large amount of illegal gear ended up on a account which is involved but not guilty. This is in order to prevent the gear from moving on into the economy which would cause us a whole lot more work. )