A means seorang, sebuah, or seekor in Bahasa Indonesia. The sentence I have a pet dog at home means saya punya seekor anjing piaraan. A is used in the sentence because the word is mentioned for the first time. In this case, the listener is not sure which dog the speaker is talking about.
An has the same meaning as a. When to use a or an depends on how the word is pronounced, not how it is written. Look at these examples:
A hospital vs an hour
A is used with the word hospital because the ‘h’ in hospital is pronounced like the ‘h’ in hey or hi or however. On the other hand, the word hour, though it begins with an ‘h’, is pronounced like ‘our’ with a vowel sound (the ‘h’ is silent). Therefore, an is used.
If a word is mentioned for the second time, the is used. Take a look at the following sentences.
I have a pet dog at home. I bought the dog in a pet shop in town.
The word dog is mentioned twice. It is mentioned for the second time in the second sentence. So, the is used. Your listener understands which dog you are talking about. The listener now understands that you are talking about your dog at home, not another dog.
However, though a word is mentioned for the first time, the is used when it is clear from context that both the speaker and the listener are referring to the same thing. When you ask somebody, Could you clean the chalkboard, please Denny?, for instance, the person you’re asking to do it knows exactly which chalkboard you’re referring to, because there is only one chalkboard, and so the is used. Or, when you ask Shut the door, please you and yor listener are referring to the same door.
Sometimes, you don’t need to use a/an or the. When you talk about things in general, like bikes in general, flowers in general, not THE bike in your garage or THE flower you just bought this morning, you don’t need to use any articles.So, when you say ‘My daughter loves apples’ that means all kinds of apples, not THE apples growing in your garden. And, you will not say ‘My daughter loves an apple’ because that doesn’t make sense. I believe your daughter loves to eat more than just one apple, doesn’t she?