For example, in the following sentences, in which ones should I use there, and not their?
____ house is beautiful.
____ are lots of skyscrapers in Dubai.
In grammatical terms, their is a possessive determiner, just like my, your, his, her, its and our. It indicates that what is described in the following noun phrase belongs to, or is in some other way associated with, the person or thing to which the possessive determiner refers. Just as my car is a car that belongs to me, so their house is a house that belongs to them.
There is a word with many uses. In your example, There are lots of skyscrapers in Dubai, it is what is sometimes called a ‘dummy subject’. It would be grammatical to say Lots of skyscrapers are in Dubai, but, generally, we don’t. We use there are (or there is) where French uses il est or il y a, German uses es ist, es sind or es gibt and Spanish uses hay.
Their means belonging to them, while there is a place or a "dummy subject." In your examples, you would say:
Their house is beautiful.
There are lots of skyscrapers in Dubai.
In the second example, there is a "dummy subject." In the following example, it is a place:
They are in the skyscraper over there.