了 (le) has many uses. You probably first learned 了 (le) as a particle that tells you an action is completed, which is also known as "了1." However, this article is not about that use of 了 (le); instead, it is about indicating a change of state (了2). In other words, there is now a new situation, or there is about to be a new situation. This whole "change of state" idea can take numerous forms, and this page includes some helpful examples.
When used in this way, 了(le) is placed at the end of the sentence to indicate a new situation.
The whole "change of state" concept might seem very general, and it is. It's vague, and it also takes some getting used to. You should expect it to take a while to get used to this use of 了 (le).
Because it's a little vague and confusing, most learners find it useful to break this "change of state" 了 (le) down into more specific usages, such as using it to mean "now", "already", or "not anymore". Although these are all "flavors" of the "change of state" 了 (le), identifying them as specific cases can make it much easier to get used to using 了 (le) in this way.