The second one has normal sentence order.
Ali Hoca İstanbul'da yaşıyor. Ali Hoca is living in İstanbul. (This is 'present continuous tense' , "yaşar" is the simple present tense)
But the first one does not have any verbs, it might be an answer to a question, for example;
Who is he? O kim?
- Ali Hoca
Which Ali Hoca? Hangi Ali Hoca?
- İstanbul'da yaşayan. The one 'living'/'who lives' in İstanbul
So,"Ali Hoca, İstanbul'da yaşayan" : Ali Hoca, the one living in İstanbul
"İstanbul'da yaşayan Ali Hoca" : Ali Hoca that lives/living in İstanbul
Now I want to give some information about the Turkish suffixes that we use with the verbs and are related to your question.
-iyor: This is "present continuous tense" suffix. It can be ıyor/iyor/uyor/üyor. It is up to the last vowel of the verb stem we have.
yaşa-mak
Here the stem is "yaşA" , the last letter of the verb stem is "a" so we use -ıyor
Keeping this last vowel rule in mind;
after a and ı --> ıyor kırmak-kırıyor
e and i --> iyor sevmek-seviyor
o and u --> uyor sormak-soruyor
ö and ü --> üyor sürmek-sürüyor
en/an: This suffix makes a verb adjective; the English equivelant of this suffix is "who/which/that is doing/does/did"
camı kıran çocuk the kid that breaks the window
Camı kıran çocuk özür diledi. The kid who broke the window apoligised.
seven adam loving man, the man who is loving, the man that loves
Gerçekten seven adam böyle konuşmaz. The man who really loves don't speak like this.
soran öğrenci the student who is asking, the students that asks
arabayı süren kadın the woman that drives the car
*When you use the verb olmak, it works like "the adj. + one" in English. For example;
Hangi araba senin? Which car is yours?
Mavi olan. The blue one.
*For the future tense we use -ecek/acak instead of -en/an. For example;
Burada yaşayacak kadın bir öğretmen.
The woman that will live here is a teacher.
*Some more examples in different tenses:
Burada yaşayan kadın bir öğretmendi.
The woman that lives was a teacher.
Burada yaşayan kadın bir öğretmen/öğretmendir.
The woman that lives here is a teacher.
When you learn a language with suffixes like Turkish, the words that are derived from the verbs can be confusing and hard to guess when you see them in a text. But if you can recognize the verb stem, you can seek information for the suffix. I hope that you don't have any problems with the difference. Good luck!