If you have the two knights the best thing to do is trade it off for a bishop to make it a more managable bishop vs. knight game, and try to keep the pawns on one side of the board as the knight dominates the bishop in this type of setting, whereas the bishop wins when there are pawns on both sides of the board.
Jeremy Silman devotes a whole chapter to this question in his book: How to Reasess Your Chess.
First we have to understand when a bishop is good or bad, or how can we turn a bad bishop into good. If it's not possible then try to exchange a bad bishop with an active knight and so on.
But to make the right decision needs experience!