My favourite technique for remembering this is to say "it is an apostrophe" (because it's is "it is", and has the apostrophe (in case that isn't clear :-) )).
I just remember that (possessive) pronouns don't have apostrophes. "My", "your", "his", "her", "their", and "our" don't have apostrophes, so why would "its"?
Meanwhile, contractions do have apostrophes. "Haven't", "should've", "that's", "you're", and "I'll" have apostrophes, so "it's" (meaning "it is" or "it has") should too.
I just remember that (possessive) pronouns don't have apostrophes. "My", "your", "his", "her", "their", and "our" don't have apostrophes, so why would "its"?
Meanwhile, contractions do have apostrophes. "Haven't", "should've", "that's", "you're", and "I'll" have apostrophes, so "it's" (meaning "it is" or "it has") should too.