All the reasons given above, e.g. lack of attention, relationship not going great could explain why people cheat.
But, some people simply cheat because they can't resist temptation, even if they do get enough attention and love from their partner. They haven't got enough willpower, or enough consideration for their partners to say no.
Personally, I don't think I could ever forgive someone who cheated on me, not right now. It may be different for a married couple who might decide to stay together for the sake of their children however.
Even if I was 100% sure he would not cheat again, that special bond a couple have, or are supposed to have, is broken if one has betrayed the other in such a way.It just would not be the same.