It is the third person singular pronoun. It can be the subject or the object in a sentence.
It’s fun. I like it.
Without a few clues, whatever ‘it’ refers to is unclear! Somewhere prior to this text, we need a noun …
Dancing. It’s fun. I like it.
If you have more than one ‘it’ within the same sentence/paragraph, it’s important they all refer to the same thing. Here is an example. Three of the four occurrences refer to an envelope; the other one doesn’t.
“What’s the sense in that, when you can open it now?” Heather wafted it above her head, the envelope frip-frapping.
It was impossible to resist. Sally stood up and snatched it out of Heather’s hand.
More often than not, such overuse of ‘it’ is easily remedied. Where it says nothing – or requires any mental agility on the part of the reader – make it say something.