"了" is tricky in usage and it confuses many Chinese language learners. Here are tips for you to get better understanding of using 了.
Two common usage of 了 in sentences.
(1) S + V 了 + O。
It means the action is done. This 了 is usually defined as "action completed 了". To take your sentence
as an example, 我买了苹果 the meaning of it focuses on the verb/action "买" is done.
(2) S+ VO + 了。
When 了 is placed in the end of the sentence, it usually carries the meaning of situation changed. This
了 is usually defined as "new situation 了". Just as your example sentence, 我买苹果了, it implies that I
finally/eventually got(bought) apples which I meant to get a few days ago but for some reasons I didn't
do it until the situation of "getting apples" occurred.
Here are sentences for you to practice.
How to say the following sentences in Chinese with 了?
- I ate dinner at 7:30 pm last night.
- I finally ate dinner at 7:30 pm last night. ( Something prevented me from having dinner earlier.)
- 我昨天晚上七点半吃了 晚饭。 (telling the fact)
- 我昨天晚上七点半吃晚饭 了。 (telling the situation changed)
Well, the usage of 了 is quite complicated, the explanation above is just part of it. Hope this would help you get a bit better understanding of 了. :)