An action or a thing + lazım / gerek at the end of the sentence:
- Necessary in general — the infinitive: Erken kalkmak lazım — “One needs to get up early”.
- Necessary for someone — the verbal noun -mA with a possessive suffix: Gitmem lazım — “I need to go”. The one who acts can be named in the genitive case: Ali'nin gitmesi gerek — “Ali needs to go”.
- A thing is needed — a noun, and the one who needs it is in the dative case: Bana bir kalem lazım — “I need a pen”.
Lazım does not change; the past is formed with -(y)DI: gitmem lazımdı — “I needed to go”. Gerek has a verb, gerekmek — “to be needed, to be required”, and it can take any tense: gerekiyor, gerekir (a general rule), gerekti — “it was needed, I had to”, gerekecek.
What it expresses
Necessity: something one cannot do without. Both words mean “necessary, needed”: the TDK dictionary defines lazım through gerek.