Knight on 5th rank


You should look to exchange it for a piece that is less valuable to you. This is usually a knight or a bishop.

It is said that such a knight is worth equivalent to a rook if not more and they are referred to as 'octopus knight' due to the large number of squares they control. Thus it may be worth sacrificing the exchange by capturing it with a rook in order to free your position.

Definitely a good question. In many openings one of White's main strategic plans is to play Ne5, so Black needs to evict that knight one way or the other, such as with an offer to trade off a bishop or knight, or via ...f6. In practice in the *opening* it seems to be to White's advantage to trade off that knight when he gets a chance (such as to get the bishop pair, or to avoid getting doubled pawns, or to create doubled pawns for Black), but if Black delays such an exchange and plays ...f5 and leaves that knight well outposted at e5 in the middle game then the knight becomes a serious problem for Black, worth a pawn for White to post it there, and sometimes worth a rook for Black to get rid of it (which then often loses the game anyway due to material deficiency).
Some openings where White prefers to trade it off:
For a very instructive game where White gambited a pawn to get a knight outpost at d5 and then won terrifically as a result is the following:
https://www.chess.com/blog/kramercito/i-boleslavsky---g-lissitzin-moscow-1956-sicilian-defense


The definition of an outpost (in chess) is:
A square, on an open or half-open file, guarded by a Pawn.
Such a square is often the perfect spot to post a Knight.
Here's a sample position:
The c4 square is an outpost for Black. It is on a half-open file (the c-file), and is guarded by Black's b-Pawn. It would be a perfect square to post one of Black's Knights.
The reason that "an open file" comes into it is: what happens if White kicks the Knight off the outpost with his own b-Pawn? If the file is open for Black, kicking the Knight out would leave White with a weak, backward Pawn on an open file... a very vulnerable position. White would only be trading one weakness (an enemy outpost) for another (a backward Pawn on an open file).
Again, a quick example:
Black can kick the Knight out with ... e6, but it leaves his d-Pawn weak and backward on the open file.