There are two uses for an apostrophe: one, to denote a contraction; the other to denote possession.
Over the years, several words have contracted to make them easier to pronounce. "It's" is a contraction of "it is", just as "can't" is a contraction of "cannot". Apostrophes are inserted to mark the positions of the missing letters.
When an apostrophe is used to denote possession, the position of the apostrophe alters according to whether the noun is singular or plural. The (singular) "boy's attitude" requires an apostrophe before the "s", whereas the (plural) "boys' attitude" needs an apostrophe after the "s".
However, as any English tutor will tell you, every rule of the English language has its exceptions. For example, it is acceptable to use an apostrophe in the case of a single letter plural such as "mind your p's and q's" - simply because its absence could cause confusion. However, this does not extend to the use of an apostrophe with other plurals (unless they're plural possessives). For example, the "1980s" are not the "1980's".
Mixing up "it's" and "its" is a common - but easily avoided - error ["Its a shame the football team lost it's away match" as opposed to "It's a shame the football team lost its away match."] If the intention is to imply "it is", then an apostrophe is used, whereas "its" - meaning an attribute ascribed to "it" - should not have an apostrophe.