So "ain't" is a contraction of "am not" but how? Other contractions like "don't" "isn't" and "can't" all make sense. But how do you get 'am' from 'ai'? Same question for won't how did we get 'wo' from 'will'?
Amn't dates to 1618, and after a little while it was shortened to 
an't. In non-rhotic dialects (that is, dialects that drop /r/ after vowels), 
an't was also used for 
are not (though I assume they were pronounced a little differently). Meanwhile, 
in't and even 
en't were sometimes used for 
isn't, and then 
an't began to be used for all three. It's not clear to me how or why the vowel changed to the long 
a sound in 
ain't, but presumably it was spelled this way to reflect that change.
A similar change happened with 
hasn't > 
han't > 
hain't. Then, since some English dialects drop initial /h/, it became homophonous with 
ain't, so now 
ain't also covers 
has not. Some dialects even have 
cain't for 
can't, so there must be something that explains the vowel change in all three. I'm just not sure what it is.
I'll get to 
won't and other weird contractions tomorrow.