First of all, Black has to decide whether to connect or not. For details, please read endgame connect or not.
~srn347: Isn't it a mistake to play if you're not going to connect?
hnishy: is generally a good move, limiting White's later options.
anonymous: As in many cases it depends on the rest of the board. If were a ko threat and the value of the ko is smaller than potential the damage to Black from not connecting but larger than the damage to White from not playing , then Black might not connect.
If he decides to connect, there are basically three ways for Black to do so: a, b, and c.
When White has two stones on the second line, covered by black stones on the third as here, the hane tsugi is not possible because of Black's atari at . This situation is considered to be Black's endgame sente.
With support stones behind, White may play this way. Black's cut at a is ineffective and White is threatening a low-risk ko starting from b.
With three stones, there are some problems. An attempt by white to hane-tsugi may be met by a throw-in (a liberty reducing tesuji). prevents further advance by White because of his defect at a. Therefore at is often correct. ( at b is not usually advisable because it gives White an opportunity to start ko by cutting at .)
Black's shape can have a comparable weakness. Instead of connecting at , plays atari and captures three or more black stones . Black can start a ko by playing at a, but the ko entirely favours White (hanami ko).
Black should stretch once, then block.
With present, Black has another weakness to be careful of. If he blocks at , is severe. If Black captures at a, White b will at least capture two stones and destroy black's defence line. If Black b, White c is more than White could expect to begin with.
Here too, Black should cede a little territory. The empty triangle of is best when there is no eye shape at stake:
If Black plays in fear of bad shape, he loses two more points compared to the previous diagram.
A: It is because of ko.
Bleedo:This is a ko to always avoid since black can always extend 2 as a ko threat.
Alex: Always to avoid for who? Yeah, Black can extend from the atari as a ko threat, sure, but just because he has a local threat doesn't make the ko good for him. This is hanami ko for White, so it's Black who should avoid it, unless he's got way more threats than White. It only costs two points to back down, and a lot more if Black loses.
fractic: Also, if Black extends from 2 the ko becomes bigger and that will make it easier for white to profit from, since Black will need bigger ko-threaths.
If the ko is serious to you, or you know you are a ko loser, don't atari! Although this costs you 2 points, do you feel it is much better if you let W invade your territory (when you lose the ko)? :-)
In this position, White's hane on the second line is gote because the stone protects. descent threatens a deeper invasion at a. If Black blocks at , hane on the first line is sente.
kmr - Instead of this , black should play 3. If then white 2 black 6, and white 5 is gote.
hnishy: Yes, though Black must be careful about peep at . Anyway White keeps sente.
If it's Black's turn in the diagram, he can play a sacrifice hane himself to prevent White's descent above. White's capture is gote.
When you have two hane possibilities nearby, some clever combinations are possible.
This is a sometimes seen shape in practice. , playing at the center of symmetry, is a double threat; a and b are miai. Black should play at b if ko threat situation is unfavorable.