I see resource icons pop over my buildings, what does that mean?

These icons are called resource bubbles. They appear randomly in the game and are supposed to be a little reward for those, who are online often and show a lot of in-game activity.
If you click on this bubble, you will receive a certain number of resources, depending on which bubble you click and how high your tick is.
The longer you stay online, the more resources you can accumulate in this way.