Rules: The indefinite articles a and an refer to any one of the category defined by the noun. The definite article the refers to a specific one of the category. Use the indefinite article to refer to any non-specific version of the noun in question.
Note: You may omit an article when you use a number.
Examples:
Correct: I want to go to the Senior Dance. The dress she picked out looks great.
Correct: I don't want an apple in my fruit basket. He needs a calculator for the exam.
Correct: I bought two books and a pencil.
Correct: I want to buy a car we looked at yesterday. (Could be any of a number of cars.)
Correct: I want to buy the car we looked at yesterday. (You only looked at one.)
Practice deciding if and where to put articles:
Resources for more information about articles:
Purdue OWL's Articles
Scribindi's Articles