I struggle a bit to get my head around tenses in Mandarin, and in particular when I need to use 了 (le).
Do you have any tips, examples or resources to help me out with this?
Usually 了 is used to indicate past tense (or the completion of). Such as:
了 is added to the end of the sentence that change the statement to past tense. You can add 过 before 了 to add emphasis.
E.g., 我吃了 (I ate) vs. 我吃过了 (I have (already) eaten.)
but 了 may be used for different reasons, some of which have nothing to do with past tense.
With imperatives, it adds urgency:
(Let's) go, (let's) go.
So, a negative imperative becomes a warning:
(I'm warning you [to]) stop talking!
With certain modifiers you can use 了 to indicate future tense:
天就要下雨了（it's raining soon)
Here 要 (an auxiliary verb) indicates future tense, by implying the sense of "going to do (something)." 會 is another auxiliary verb that does the same thing, but in the sense of "intending to do (something)."
了 when used after an adjective or noun, conveys the meaning "has become"
我餓 (I'm hungry)
我餓了 (I became hungry)
Here 了 expresses a clear (change of) state.
了 can also be used to express excessiveness.
太 + (stative verb/adjective/noun) + 了. E.g., 太冷了.
(stative verb/adjective/noun) + 极了. E.g., 热极了.
可 + (stative verb/adjective/noun) + 了. E.g., 可难了.
太 can be used without 了. If omitted, the tone can sound rather rough.
Personally I think the answers you got here are dangerously imprecise, despite being correct in practice.
Since 了 is often a critical topic for all newbies, I would like to integrate in the following way:
了 expresses completion of an action or change.
That's why you can use it to produce a past tense, as in:
我买了一辆车 = I bought a car
Then you can use it for its other value (change) to express commands (imperative), as in:
闭嘴了 = shut up!
别闹我了= stop bothering me!
我们走了 = let's go
你关门了 = close the door!
and so on. You can do that because a command implies a change in what someone's doing: you're talking (status quo), but now I want you to stop (change); or you are not closing the door (status quo), now I want you to close it (change).
For this reason, the following very common sentences have completely different meanings:
我知道 = I know
我知道了 = I got it (I know it now, but I didn't knew it before)
And then you can use it to express something you're going to do (future) or a decision you just made:
我付钱了 = I'll pay!
As opposed to
我付了钱 = I've (already) paid
The presence of other particles can strengthen its soon-to-change valence, as in 要…了：
飞机马上要落地了 = the plane's about to land
我快要毕业了 = I'm graduating soon
And finally some examples to show the difference between past, status quo, change and future change with:
今天下了雨 = it rained today (it's stopped now)
下雨呢 = it rains (it was raining before too)
下雨了 = it rains (now, while it wasn't before)
今天要下雨了 = it's going to rain today
But watch out, because 了 doesn't necessarily express a change that's taking place right now: it might describe a situation that started and hasn't ended yet. Then mix it with the past 了 and you'll have enough to play with for a while:
Change in the past (ending point):
我等了一个小时的车了 = I waited the bus one hour (I'm not waiting anymore)
Change in the past (starting point)
我等车（已经）一个小时了 = I've been waiting the bus for one hour (the wait has started and I'm still waiting)
Hope this helps clarify a little bit!
I think, after a long while I finally managed to figure out how to both wrap my head around this and how to actually explain how it works, as well - after 2 years (60 Ms) and two more courses of Chinese Mandarin later from my original post on the topic here:
So here goes with what I've gathered, and feel free to challenge anything or even everything said here.
了 is NOT a tense marker. Period. That said, there are situations where it certainly seems to look like one, and that's where I think the confusion comes from. From multiple sources - including instructors and textbooks - if you have something like "I read a book" in English, meant as an answer to a question of the form "What did you do last night?" (Chinese: 你昨天晚上做什么？）, the answer is indeed given as you'd expect using "了":
And indeed if we did not include it and just said 我看一本书, it would sound as strange as if I were to say in English, "I read (pronounced reed) a book" as a response to the given question. And it is also true that in this context it effectively serves the same function of harmonizing with the past nature of the action in question.
The key point though in understanding it is that the logic of 了 in how it does this is different from that of how the "-ed" ending (here heard in pronunciation but masked by the irregularities and vagaries of English orthography) in English does it. "-ed" directly marks past time. However 了 can be interpreted in at least two ways, depending on what model of grammar you want to use as in any analysis of human language there may be and are often different conceptual or theoretical models of how a language functions that can explain the phenomena within it and many arguments are waged in linguistic studies as to which are the "best" models in question: keep in mind that "grammar", as we call it, is not so much a rule book that was written up by the language's "inventors", i.e. its users, but rather that grammars, like dictionaries, are attempts by language scholars to describe how language operates in detail, and thus it can vary from scholar to scholar how it may be understood.
With that out of the way, we will proceed. The first model is perhaps the one most commonly cited, and that is that "了" is an aspect marker that marks the perfective aspect, that is, the fact of something having been completed, finalized, or brought to its end. In this case, what the sentence then says is to assert as a fact that the reading of the book is completed. This, without further indicators, implies that it must have been in the past, because of how that causality works in the physical universe: the bringing-to-completion of something is caused by things-that-bring-it-to-completion, and causes always precede their effects, thus the "reading process" - the stuff that was needed to bring about that culmination - must have, by inference, occurred in the past.
The second model (see here: https://chinese.stackexchange.com/a/22407/16171) is a bit different in how it conceptualizes 了 but it follows a similar logic. In this interpretation 了 is a marker for the realis mood, meaning that the reading of the book is something that is an actual state of affairs in the world, not, say, a hypothetical. With regard to an action taken, like "reading a book", the only way this can be actual is if the reading is either being done right now, or it was done in the past, because (at least cognitively, not wanting to drag in deep philosophical and even physics-related arguments about the ontological status of the future) only the past and present are real, the future is hypothetical or unreal (the mood that expresses this is called "irrealis" in linguistic terminology). By elimination of the possibility of the reading happening in the present (since you see I am not engaged in it), then it follows (this form of a logical argument is called a disjunctive syllogism - which goes: P or Q. Not P. Therefore, Q.) that it occurred in the past.
Whatever the model we choose to use to understand this bit of language, we arrive at the conclusion the action was in the past, and that the past-ness of the action is indeed communicated by 了. However, it gets there by a different route than English does, and understanding both that route and how it gets to this outcome and moreover acknowledging that it does still lead to the same outcome, are all important to properly understanding the usage of this important basic word. Because if we interpret it as having no relevance to time, we will be plagued with suspicion about the fact that
is a valid way to answer
AND if we interpret it as being a tense marker like in English, we will not be able to understand how a construction like
could make any sense, as if it is tense, that sentence is literally a logical contradiction saying something is simultaneously in both the future (tomorrow) and the past (misunderstood 了).
The aspect theory seems to be the more commonly used one, but what's often missing it seems is an explication of the logic of how this does relate to time even though and while importantly pointing out that the direct referent is not time, and I think that makes it hard for English speakers to make the transition because they will be naturally inclined (as indeed one of the papers referenced in the second link talks about) to be focused on the time aspect and will rightly pick it out, but the base concept is not time, and the proper explanation must be able to accommodate both instead of just saying it's not a tense marker and then leaving it at that and leaving the individual in question hanging.
了 is often used in the past tense, but should not be confused with 过. 了 implies a recent change that might still be in effect, while 过 is further in the past and is no longer in effect.
我坐了 I have sat down (and am still sitting)
我坐过 I have sat down (and am no longer sitting)
You can also use it with 太 to put emphasis on something.
太冷了 Too cold!
I read Chinese Grammar Hack: The Many Uses And Rules of 了 (le) in eChineseLearning blogpage, and it introduced 3 main uses of “了 (le)”:
Tā yǐqián hěn tǎoyàn tā.
He hated her in the past.
VS. Tā chī wán le fàn.
He had a meal.
As we can see in the first sentence, “hated her” shows a state, not the completion of a specific activity. Therefore, we don’t use “了 (le)” after the verb, or at all in this first example.
As for the second example, we learn of an activity that has been done, so we use “了 (le).”
Wǒ xǐ le zǎo jiù shàngchuáng shuìjiào le.
After taking a shower, I went to bed.
Tā rèxīn de bāng wǒ sǎo le dì.
She helped me eagerly to sweep the floor.
Tā cānjiā le zhècì huódòng.
He took part in this activity.
I think it may help you.
The particle 了 (le) suggests a completed action. For example,
吃饭了 (chi fan le), finished eating.
To make some corrections to The_Sympathizer answer.
the only way this can be actual is if the reading is either being done right now, or it was done in the past, only the past and present are real, the future is hypothetical or unreal
Mostly true, BUT... there are actually 2 realis markers.
You can and must use verbal 了 in future context to mark that "X will be done only after Y becomes factual (real)". For example: If or when Y is true, X will follow.
吃完了午飯就走 that is Y = "吃完午飯" and X = "走"
this expample can be translated as:
"When(了) eating(吃午飯) is finished(完), I will(就) leave(走)."
Here I put 了 next to "WHEN" to indicate that 了 marks relative realis condition and WHEN is the best way to translay 了 here. So another translation could be :
"When in real life eating is over, I will leave."
The sentencial 了 marks absolute factuality and can't be used in Future contexta.