The black shape in this diagram is called the door group, and it is dead as it stands.
Creating some sort of shape by turning at is Black's strongest attempt to live. White refutes it by reducing Black's eye shape with
. After that, a and b are miai to limit Black to one eye.
The door group with one extra leg is unsettled. Since a move at a reduces the shape to the dead door group, it is White's killing move. Incidentally it is also one of the moves allowing Black to live. From this it is also easy to understand that the door group with two legs is unconditionally alive.
The presence of hane at the marked points helps a bit towards life for the black group, while absence of either stone helps a lot towards its death. Keeping this in mind, together with the shapes above, will help you to analyse similar situations in your games.
--Stefan
Exercises on the door group: