It depends on the situation, which of the 2 pieces are better etc. In many cases advanced knight in your opponent half of the board that can't be kicked with a pawn is a very good piece and it might be a good idea to keep it on the board and not exchange it for opponent's bad bishop. On the other hand his bishop might be a very good piece and it is ok for you if the trade happens.
Sometimes in order to fully use that knight you might want to exchange that bishop with your own bishop if it is still in the game in order for that knight to remain unopposed.
Knight outposts?

A few other ideas to think about. You can try to trade off defenders of a weak square before occupying it. A weak square is a long term advantage, you dont have to cash it in immediately, it also can provide a useful (positional) target to build a plan around. Weak squares can be used as infiltration points into your opponents position as they can also be occupied by other pieces, so you might want to avoid trading if it leaves your pawn on the square blocking the way in. If you look up Amateurs Mind on Amazon and read the preview, the first chapter is on bishops vs knights. It might give you some more ideas.
If you put a knight on a square which can’t be attacked by a pawn and is defended by your pawn, you’d call that an outpost. Is it good putting the knight on a square like that if it is defended by another piece like a bishop? What are the advantages of trading that piece, and then leaving the pawn hard to defend (if your material is even)?