The long form A is used before a noun that begins with a vowel sound (e.g., an apple), while the short form a is used before a noun that begins with a consonant sound (e.g., a pear). In addition, the long form is also used after the verb "to be," regardless of the following noun's initial sound (e.g., He's an actor). As a general rule, then, if you're unsure which form to use, it's best to go with the long form.