You don't. Hacks target the exchanges wallet by finding exploits and not the user accounts separately. If you want your funds to be safe, use exchanges for trading only and withdraw to your personal wallet.
I love it when people say this. How the heck do you 'trade' if you keep your coins in the wallets... You don't.
IF you're holding, then yes, keep it in your wallet. If you trade it makes no sense.
What I meant is do the trade and withdraw instantly. Exchanges were created for trading and not for holding your funds. Unless you are day trading, I see no reason on why you should keep your money on an exchange for a anything more then a few minutes. Trading with individuals on forums etc. is another option to avoid using centralized exchange.