The Buddha didn't talk about forgiveness per se.
Maybe he didn't need to. After all, each person owns their own karma -- what they've built up from past actions, what they're doing now to influence the future. If we see how our actions stem from myriad interdependent causes and conditions and understand that our future depends on the actions we take now, then there is nothing to forgive, no one to forgive or to seek forgiveness from.
But for those of us who are still in the process of discovering our intrinsically good buddhanature, forgiveness can be a useful tool for scraping off the schmutz. It's intimately related to letting go -- if we're holding on to a grudge against someone or judging something we've done, it's still got its hooks in us. Forgiveness releases it.
"Hatred never ends by more hating, but only by abandoning hate. This is an eternal law," the Buddha said. And forgiveness is a way of letting go of hate.
On the Buddhist path, practices generally start with the practitioner.
Say you are being hard on yourself because you haven't been meditating as much as you think you should. Or that your meditation hasn't been as good as it should be. You read Pema Chodron; you know that gentleness is called for. But you just don't have that available. You're a fuck up, a loser. You can't even be nice to yourself. You do not deserve niceness.
See how that first thought spirals into a general attitude of worthlessness? What if, instead, you could stop the progression? Ideally you'd stop it at the first thought, before the train gets rolling. But what if you notice it only after the train of thoughts has made it to the Continental Divide, providing much material for future self-flagellation? Then forgiveness comes in handy.
Whatever you did or didn't do is in the past. This moment you have the opportunity to begin again. You did the best you could with the mind you had, the time you had. Today you're different, time is different. (Note that doing the same thing over and over and expecting a different result is delusional; awareness also has to spark a change, or at least the knowledge that you're making a choice not to change.)
Forgive yourself for not being the best meditator. Forgive yourself for thinking that you should be the best meditator. Forgive yourself for the nasty names you called yourself in your mind.
And once you begin to see that you didn't set out to mess up, that it was the inadvertent result of choices that seemed good in that moment, maybe you see that the sixth-grade classmate who mocked your shoes or your haircut or your lunch or the friend who didn't return a phone call also didn't have the tools to make wise choices. Consider that in that moment they were doing their best with what they had. It wasn't all about you. Forgive them and free yourself from the hook.
image from wikimedia commons. A woman writes a message on the "Wall of Forgiveness", plywood sheets covering broken windows on the HBC Building, following the 2011 Vancouver Stanley Cup Riot. Author is Guilhem Vellut from Vancouver, Canada.