a (1) Look up a at Dictionary.com
indefinite article, mid-12c., a variation of Old English an (see an) in which the -n- began to disappear before consonants, a process mostly complete by mid-14c. The -n- also was retained before words beginning with a sounded -h- until c. 1600; it still is retained by many writers before unaccented syllables in h- or (e)u-, but is now no longer normally spoken as such. The -n- also lingered (especially in southern England dialect) before -w- and -y- through 15c.
a (2) Look up a at Dictionary.com
as in twice a day, etc., from Old English an "on," in this case "on each." The sense was extended from time to measure, price, place, etc. The habit of tacking a onto a gerund (as in a-hunting we will go) died out 18c.