The size of the library folder is 90 GB. Because so big

I have an iMac running High Sierra. The library folder in my user account appears as 90 GB. I was looking for the main factors in this and the Mobile Documents folder is 50 GB. When I click on the folder, the iCloud unit opens on my machine! Apparently they are the same. I recently read that the icloud unit was like Dropbox or Google. You can store things there to save disk space. I increased my storage in icloud but now it seems that it uses space in my internal disk anyway. What gives?