ある means 'to be located/to exist'. The particle が marks the thing that exists. The particle に marks where it is located. In 箱が家にある (the box is in the house) the box is the thing that is doing the existing. The house is where it is located.
ユニバーサルスタジオがあるのを聞きました means " I heard that there is a Universal Studio". Universal Studio is the thing that exists/is located somewhere, hence it is marked with が. Your sentence says nothing about where Universal Studio is located. If it did, that would be marked with に.
Perhaps the bit that's actually confusing you here is の. Let's break it down a bit more:
- ユニバーサルスタジオがある -- Universal Studio exists.
- ユニバーサルスタジオがあるの --the fact that Universal Studio exists.
- ユニバーサルスタジオがあるのを聞きました -- I heard the fact that Universal Studio exists.
Your second sentence has nothing to do with ある/いる. I'm confused.
北海道に日本人の友達が住んでいるんです。
You ask why に is not used, but it is. The friend is living in Hokkaido (北海道に). Again が marks the subject, i.e. the thing doing the verb (住む). In this case the thing doing the living is 日本人の友達 (a Japanese friend).
The fact that 住む is written in the progressive form (住んでいる) has nothing to do with the choice of particles.