when something was done by accident.
or when somebody shows remorse (deep regret) for their actions.
when somebody apologises for a mistake they made.
for example, a situation when a driver is unable to brake in time before crashing into cyclist, resulting in death or injury.
the driver did not have enough time to stop the incident, or the cyclist was not being careful. it would be an accident since it was neither of their intentions, so it should be forgiven.
however, some situations do not call for forgiveness.
for example, pre-meditated murder with no remorse. the family of the victim would not forgive the murderer because it was intentional harm.
the choice to forgive depends on how serious the situation is and the circumstances.