What does Shakespeare mean by the word 'a?

It usually means "he". Thus the Nurse in Romeo and Juliet: "God be with his soul! 'A was a merry man!"

It's an archaic abbreviation of sorts. Pronounce it "uh".

Please note that the apostrophe precedes the word: it's 'a not a'.