'A' without an accent represents the verb 'avoir', it can be used as a verb or an auxiliaire and can therefore in a sentence be replaced with avoir. 'A' with an accent can't t be replaced by avoir but is also a preposition that is invariable and serves to introduces a complement.