'it' does not refer to anything in this sentence.
I am not very good at grammar as well. i checked the dictionary.
It | Define It at Dictionary.com
(used to represent a concept or abstract idea understood or previously stated): It all started with Adam and Eve. He has been taught to believe it all his life.
6. (used as the impersonal subject of the verb to be, especially to refer to time, distance, or the weather): It is six o'clock. It is five miles to town. It was foggy.