Black’s task, of course, is to live, but there are several ways to do so. The real problem is in finding the best way to live.
Black to play.
Solution
Failure 1 Even when the task is to live, you want to live with as much territory as possible. Therefore, in this kind of a problem, you first want to consider the eye-shape expanding move of black 1. Unfortunately, white 2 is a good response, and Black is forced to play 3–5, giving up two stones in the process. Black can do better than this. If instead of 3 Black plays at 5, then white a, black b, white c, and black d start a kō for the whole black group.
Failure 2 Another way for Black to try to optimise her territory is to not to try to expand the eye shape, but to play a move on its border that does not fill up black territory, such as 1 here. This time, white responds with 2. Black 3 is then good for building eye shape but, up to 10, White manages to create a gote seki. Still, this is slightly better for Black than the previous outcome.
Failure 3 What if Black goes directly to try to secure two eyes with 1? This time, white 2 turns out to be a good response. The best Black can do is then set up a seki with 3–9, but this is considerably better for White than the previous diagram because White also gets sente.
Solution Black’s best move is the non-obvious empty triangle of 1, which makes a miai of 2 and 3. This way, Black avoids having to sacrifice two stones and also secures five points of territory.
Solution added.