This one is explained all over the place, yet is still used inaccurately all the time.
First thought: It + ’s is a combination of it and is. It’s a contraction, meaning two words made into one, and made shorter in the process. You can use it’s when you are combining the two words it and is.
What can be confusing is that we have been taught that “’s” (an apostrophe before the letter “s’”) indicates possession. So you have my condolences for the difficulty, but you also have my respect that you can get over it and slip into accuracy.
Its means “belonging to it,” whatever it is. Let’s say you’re talking about a plant when you are referring to it. You can say that “its color is purple,” and you’d be accurate (unless it was another color). If you’re unsure, try (silently) saying, “It is color is purple.” That sounds dumb, and it is. So you can’t spell this possessive word any way but its.
BTW: Its’ isn’t a word. It’s an abomination. Never use that.