You say "It happens." when someone is worried about something bad that they did, and you want them to stop worrying:
A: I'm so sorry I'm late.
B: No worries. It happens.
The phrase means something like, "Things like this happen to everyone sometimes."