The number one way of playing against possession is to ignore it. It takes a long time to get a possession; you need to waste a turn getting a potion, then waste another turn (where you have the potion and $6 in the four other cards, basically more difficult than getting a province) buying the possession, then you actually have to play it often enough to make this worth it. Basically you need at least two plays of possession, probably more, to make it worth it. And on most boards, just racing for the provinces is going to be fast enough to make this entirely not worth it. It's a little more interesting in colony games, but still quite often just going for the colonies and ignoring will be the best bet.
But there are, of course, a number of reasons to go for possession. Usually this has to do with having other potion-cost cards that you want anyway, and then later you happen to get enough to buy a possession and go for it. The top card here is apothecary, which helps you get to 6p fairly well and helps you play possessions more often when you get them. Alchemist fits too, though more on that card's interaction later. And golem is a natural fit, too, if you actually want to spend the time for that card (which has its own issues). There are a number of other scenarios where you want to go possession as well. Probably the next-most-common is in a chapel deck, where your opponent's deck is likely to be strong for you to possess, and you'll likely be able to play your possession often.
So let's assume that for whatever reason, your opponent is going to have possessions in his deck. What kind of cards do you want and not want to have in your deck. Basically, what cards have more value to you intrinsically for owning them, which cards have less value for you than your possessor, and which cards does it not matter much for?
Among the cards that are more valuable to you, the most obvious are victory cards. They lead you to victory without giving your opponent anything. The next place to look is attack cards. In order for your opponent to get benefit from them, they must attack themselves. Possession fits here as well, as does golem when there are lots of you-benefit, they-hurt actions in your deck. There's also VP chip cards. All of the VP chips go to you, not them, so at least a significant portion of the card's benefits lie squarely with you.
The top two cards you don't want in your deck when being possessed are ambassador and masquerade. They let your opponent have your precious, precious (good) cards. On the other hand, there aren't that many boards where you can just ignore these cards. If you ignore ambassador, you'll be quite swamped and slowed, and you almost certainly won't get a possession soon enough or often enough to take advantage of your opponent's ambassador. Furthermore, they can ambassador you an extra ambassador and get a possession themselves. It is similar with masquerade, except that you won't be swamped so much as you'll be too far behind. In fact, most decent masq or amb decks will be enough ahead that they could deal with a province switching hands.
But there are a whole class of other cards that you want to avoid having when your opponent possesses you. Chief among these are trash-for-benefit cards. Remodel, salvager, expand, apprentice, and the like. While you often don't want to trash your own provinces with these, your opponent will have no such compulsions. Bishop is, of course, an exception, as you retain the benefit. Cards that have you choose what you do to your opponent are also much stronger in your opponent's hands: the big example here is swindler, which will turn curses into coppers, etc. rather than the other way around, and spy-style attacks are here too. Many now-or-later cards are significantly worse against possession as well; with courtyard and haven, they'll simply give you an estate (or your other weakest card) next turn, reaping the full benefits for themselves.
Duration cards in general have a slightly weird interaction with possession. Because their effects are usually better on the next turn than the one they're played on (because you didn't have to spend the card and action), so they're slightly better for your opponent than they are for you (generally you shouldn't play them against possessions unless you need them, which, on the other hand, you quite often do). So they end up being basically a wash (lighthouse) to being really bad (tactician).
The final note I'd like to make about possession is in dealing with styles of deck. Money decks tend to fight possession a bit better than engine decks do. There are a few reasons for this. One is that engines tend to take longer to set up, giving their value over fewer turns, and if they're viable, these turns are significantly more valuable. They also come later, which is when you can be possessed, so quite a higher percentage of their value ends up getting stolen. Beyond this, there are often many ways for the possessor to mess up your engine. One big way is to trigger reshuffles at inopportune moments - the classic example is a minion deck that they force to reshuffle after having played all your minions, where your deck will then be crippled for a couple of turns. But there are also cards like treasury, alchemist, herbalist, and walled village, that you better believe they'll use to give you a much worse top of deck than you would.