It's nice to be able to say the red apple or my friend, but it's much more powerful to be also able to say the apple I bought or the friend who called me.
In English, such sentences have basically two forms:
1: the friend who called me
2: the apple (that) I bought
In the sentence 1, you are describing the friend by what he did: he's the subject of called me. In the sentence 2, you are describing the apple by what happened to it: you bought it.
In the first sentence, English must use the 'linking' word who; in the second one, the word that is optional and is mostly dropped out.
In Croatian, there always must be a 'linking' word. It's the same word — koji — in both sentences, but in different cases.
Simply said, the word koji stands in for the noun you describe, and adapts to its gender and number but also to its role in the description.
In the sentence 1, the friend is the subject, therefore we use koji in the nominative case:
1: prijatelj koji me je zvao
In the sentence 2, the apple is the object — it's bought — therefore we must use accusative, but also the feminine form, since jabuka is of course feminine in Croatian:
2: jabuka koju sam kupio
The section koji me je zvao or koju sam kupio — is another type of clause — relative clause. As in all other clauses, word-counting restarts in them.
The forms of koji are the same as moj, except for koji having always an -i in nominative masculine.
When you describe a noun like that, you can use it in any sentence, but the description must come right after it. For example, that friend who called you could also come to beach, so you would say:
Prijatelj koji me je zvao je došao na plažu. The friend who called me came to the beach.
This sounds a bit awkward, but Croatian is flexible and usually nouns with such descriptions attached are moved to the back:
Došao je na plažu prijatelj koji me je zvao. (the same meaning)
Bear in mind that the description does not change if the described noun change its case:
Vidim prijatelja koji me je zvao. I can see the friend who called me.
Razgovarao sam s prijateljem koji me je zvao. I talked to the friend who called me.
But if you change the noun to plural, you must also change the description, since you are now really talking about something else:
Vidim prijatelje koji su me zvali. I can see the friends who called me.
It's also obvious that forms of descriptive clauses are the same as questions starting with koji. Therefore, if the role in description involves a preposition, you must place it before koji:
Vidim prijatelja s kojim sam putovao. I can see the friend I traveled with.
English is full of reduced passive clauses; for example, instead of:
We live in a house that was built by my grandfather.
the normal sentence is:
We live in a house built by my grandfather.
Such reducing is impossible in Croatian. Such passive clauses must be actually rephrased in Croatian into non-passive:
Živimo u kući koju je izgradio moj djed. We live in a house my grandfather built.