The OSPF hello packet has a secondary function: it can detect when a neighbour is unreachable or in a poor state.
OSPF has a second timer called the dead interval timer, which by default is 4 times the length of the hello timer. When a hello packet is received, the dead timer resets.
If a hello packet is not received for the entire duration of the dead timer, the state of the neighbour is set to Down, and a LSA is sent out advising of the topology change. This causes the SPF algorithm to recalculate metrics and routes in the area.