There is often confusion between its and it's. If you delve deeper into this issue, you will see that there is good reason for the confusion. However, if you just want to know what is right, the matter is very simple:
It's
*It's is short for it is or it has. This is a 100% rule. It cannot be used for anything else. If you cannot expand it's to it is or it has, then it is wrong.
Its
Its is like his and her.
*His is used for masculine things. (These are his pies.)
*Her is used for feminine things. (These are her flowers.)
Examples:
*It's been raining for a week, and now it's starting to snow.
(It has been raining....it is starting to snow)
* I think the company wants to have its cake and eat it.
(its - possessive form. This is correct.)