The Two Knights Defence arises from 1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6, counterattacking against White's e4-pawn and preparing ...d7-d5.
The Two Knights Defence can be considered a gambit system, since after 4.Ng5, attacking the f7-pawn, Black must either sacrifice a pawn, or allow White attractive gambit possibilities with the risky continuation 4...d5 5.exd5 Nxd5.
4.0-0 and 4.Nc3
4.Nc3 allows the "fork trick" 4...Nxe4! 5.Nxe4 d5, which gives Black good play. White is sometimes tempted to expose the black king with 6.Bxf7+ Kxf7 7.Neg5+ Kg8, but then Black gains the upper hand in spite of the misplaced king, due to the strong centre. White's best practical chance after 4.Nc3 Nxe4 is probably the Boden-Kieseritzky Gambit, 5.0-0 Nxc3 6.dxc3 f6 (6...Be7 is a reasonable way to return the pawn in order to get level chances, although Black's winning chances here are somewhat fewer), whereupon White can generate some hacking chances against the weakened black kingside with Nh4 followed by f4. I don't think that White can get enough compensation for the pawn with accurate play, but the line can be tricky for Black to defend against over the board. 4.0-0 generally transposes after 4...Nxe4 5.Nc3. The notes to Game 3 on the Boden-Kieseritzky Gambit page specifically cover the Two Knights Defence version of the gambit.
This move aims for a slow positional build-up. Black can strike out in the centre with 4...d5, which often involves a sacrifice of the e5-pawn, but this line is somewhat dubious. It is more reliable for Black to prepare ...d7-d5 by playing 4...Bc5 or 4...Be7, followed by castling kingside (getting the king off the e-file) and then playing ...d7-d5 in most cases (although White's approaches with an early Rf1-e1 or Nb1-c3 can rule out ...d7-d5, here approaches striving for an early ...f7-f5 are interesting). Against passive ways of following up 4.d3, Black can also consider leaving the king in the centre and pushing the kingside pawns, though this policy is dubious against White's more ambitious set-ups.
This aggressive response gives Black no good alternative to 4...exd4, transposing to a position that I cover via the Scotch Gambit. Play is dynamically equal and Black has quite a wide choice against White's possible responses, of which 5.0-0 and 5.e5 are the most reliable. Against 5.0-0 Black should play 5...Nxe4, since the Max Lange Attack following 5...Bc5 6.e5 d5 7.exf6 dxc4 8.fxg7 Rg8 9.Re1+, with 10.Bg5 to follow, leaves Black with problems finding a safe home for the king. The line with 5...Nxe4 6.Re1 d5 7.Bxd5 (the Canal Variation, 7.Nc3, is dubious due to the response 7...dxc3 8.Bxd5 Be6 9.Bxe4 Qxd1) 7...Qxd5 8.Nc3 gives equal chances for both sides after either 8...Qa5 or 8...Qh5. Against 5.e5 the traditional main line is 5...d5 6.Bb5 Ne4 7.Nxd4, but I would advise Black to take a close look at 5...Ne4 and/or 5...Ng4, both of which are fully playable and provide reasonable winning chances.
Tarrasch described this as a "real bungler's move" according to Tim Harding, moving a piece twice in the first four moves in order to start an early attack on f7. However, the reason why it works here is that Black cannot take advantage of White's loss of time without sacrificing a pawn, and this leaves the resulting positions dynamically balanced.
Black has various sidelines against 4.Ng5, some of which are fairly respectable. The Traxler Counterattack, 4...Bc5!?, allows White to grab the f7-pawn but seeks counterplay against f2, and Black's attacking chances after 5.Nxf7 Bxf2+ are sufficiently dangerous to cause most White players to prefer the relatively stable plus that results from 5.Bxf7+, giving White an extra pawn and putting the onus on Black to develop long-term attacking chances on the kingside.
The most obvious counter, 4...d5 5.exd5 Nxd5, is dubious because it exposes Black to dangerous knight sacrifices on f7. White can sacrifice the knight immediately with 6.Nxf7, the Fegatello or Fried Liver Attack, which appears to be fully sound, or try to wait for a better moment to take on f7 with the Lolli Attack (6.d4). Thus, Black generally prefers to sacrifice a pawn, and a couple of interesting sidelines are the Ulvestad Variation (4...d5 5.exd5 b5!?) and the Fritz Variation (5...Nd4), although with best play the two transpose to each other, if White can find the accurate response 5...b5 6.Bf1! and 5...Nd4 6.c3 and if 6...b5 7.Bf1!. With best play Black probably falls short of full compensation, however.
Therefore the main line runs 4...d5 5.exd5 Na5, which should give Black sufficient compensation for the pawn, as Black normally gets a large lead in development. The most popular continuation is 6.Bb5+ c6 7.dxc6 bxc6 8.Be2 h6 9.Nf3 e4 10.Ne5 Bd6 (I think 10...Bc5 may be an improvement) 11.d4 exd3 12.Nxd3 Qc7, but there are various sidelines including 6...Bd7, 8.Bd3 and 8.Qf3.
The Two Knights Defence player has a fair number of transpositional tricks available to get into lines of the Two Knights Defence even if White doesn't play 1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6. Some of these include:
1.e4 e5 2.Nf3 Nc6 3.d4 exd4 4.Bc4 (Scotch Gambit) 4...Nf6 (transposing to the Two Knights Defence with 4.d4 exd4)