A bad beat is when you get your money in as a big favorite and the other guy draws out on you to win.
But to make it more complex, if the other guy has to be making a bad move. That is, if he's a 3:1 dog but the pot would net him 4:1 on his money, he's priced into the hand, so he was not making a bad move.
Now, a cold deck is when two people have a hand that they can safely assume is the best hand, so they (usually) suffer a big loss. for example, if I have 8/8 and you have 9/9 and the flop is 8/9/A, I'm going to lose a lot of money because of the cold deck.
A/A vs K/K match ups are a prime example of a cold deck as well. But if the K/K beats the A/A, that's a bad beat.