We have two kind of articles : definite article (the), and indefinite article (a,an)
So when we say i want an apple it means generally i want an apple doesn’t matter if it is the red one or blue, but when ever we say i want the apple it means i want that specific apple.