Asylum refers to political protection. It is given to those who are persecuted for something in one country, and wish, no, are in need of sanctuary in a country that will not imprison, torture or otherwise perpetrate human rights violations against the individual who is at risk. Granting asylum is a measure that transcends and supersedes all international laws of immigration that might otherwise be in place.
Exile can be involuntary OR voluntary. Involuntary scenario: Emperor Napoleon (the first one, I think) was exiled by the French government to the Island of Elba.
All instances of exile are not punitive though. Here's an example of going into exile in order to avoid prosecution (not persecution), motion picture director Roman Polanski. Polanski chose exile to avoid criminal charges in the United States.
Voluntary scenario: Hypothetically, Polanski might have chosen to leave the U.S., in a self-imposed exile, to get away from the emotional anguish he associated with the U.S.A, where his 8+ months pregnant wife, Sharon Tate, was murdered by Charles Manson et. al. I mentioned that just for illustration purposes. It is well established that Polanski was a fugitive from justice and went into exile to a country that didn't have mutual extradition laws in place with the U.S.A. (And, unlike Gaddafi, Polanski was not accused of a crime as serious as mass homicide, which is a reason the country he fled to was willing to tolerate him.
Corrupt head of state example
Baby Doc Duvalier went into exile in France, once his oppressive totalitarian regime was overthrown by the people of Haiti. It was not so much a matter of France offering him political asylum, as France tolerating him to live there, an ocean away from Haiti. That's an example of exile, rather than asylum. It is involuntary, as Duvalier had to get out of Haiti. It is voluntary, in that he chose France (I guess).
Regarding @Mike's follow-up comment,
So if asylum is the act of asking for protection and exile an act of being sent away, why are we talking about "corrupt head of states going to exile in another country"... it should be "head of state asking for asylum" or "country offers asylum". Why is that?
@Mike cites a specific example, a Reuters news story about Gaddafi. However, this was NOT a situation where another country offered asylum to Gaddafi (the corrupt head of state that Mike referenced). Here is the relevant part of the Reuters article:
Burkinabe Foreign Minister Yipene Djibril Bassolet said that Gaddafi
could go into exile in his country even though it is a signatory of
the International Criminal Court, which has charged him crimes against
"In the name of peace, I think we will take, with our partners in the
international community, whatever steps are necessary," Bassolet said,
without giving any other details.
It is important to note that Burkinabe Foreign Minister Bassolet said Gaddafi could go into exile in his country. He was willing to tolerate Gaddafi as an exile in his country only for the sake of expedience, to end civil war in Libya with associated loss of life. It was offered for the greater good of peace.
That is very different than granting political asylum to Gaddafi! It offers no guarantees of permanence unlike being granted political asylum. Being allowed entry as an exile, under conditions of duress (e.g. as Burkino Faso proposed), is an emergency measure. Gaddafi would have had to accept whatever terms he was offered by Burkino Faso, even it meant house arrest or confinement in primitive circumstances in exchange for assurance of his physical safety. The world community would have censured a country who was a signatory to the International Criminal Court, yet gave Gaddafi asylum.
This is the distinction between exile and asylum, although you may notice the words being misused, for political reasons, at times.