Its is possessive. It's is a conraction of it is. So the place where a fox hides out is its den, but if the fox has lived in that den for many years, then it's old.
The way I remember this is that if you take a letter out of a word, you MUST replace that letter with an apostrophe. So you have to replace the i you took out of it is, when you made it's.
That little rule about replacing letters with apostrophes will also help you spell y'all, if you're one of those people who ever needs to spell it. It is often misspelled ya'll. However, since the apostrophe is replacing the -ou in you, it has to go after the y. There are no letters missing in the all part of y'all, so don't stick any apostrophes in it. This might also help you with your and you're and their and they're. You have to replace missing letters with an apostrophe, and in both you're and they're, you're pulling an a out of are.
One final note. When I originally wrote this, I thought that somewhere in our history, grammaticians had left the apostrophe out of its as a possessive in order to distinguish it from it's, as in it is. That's not true. All possessive pronouns don't use apostrophes. That cake is hers, not her's. This car is ours, not our's. So its is just following the rules for possessive pronouns.