The trouble it causes has to do with the possessive form vs. the contraction form. In my opinion, it's (it is) in the top three mistakes made by writers, especially those who don't write often. Heck, even the grammar checker that came with my computer gets it wrong all of the time, telling me to do the opposite of what I should do.
Other singular words form a possessive with the apostrophe-s combination: the boy's ball, Dad's car, the doctor's practice. But the word it is contrary. The possessive is its - with no apostrophe: its food, its length.
The apostrophe comes in with the contraction of it is. The contraction is it's.
So the rules are:
Contraction for it is: it's