You use it whenever you need to count elements of a union while you have information about their numbers in each part.
All you need to do is to draw Venn diagrams for two and for three sets.
For two sets:
How many elements are there in total?
The number of elements of $A$ plus the number of elements of $B$, but since the elements in the intersection have been counted twice, we substract the number of elements in the intersection once, to get them counted just once.
For three sets:
How many elements in the total?
the number in $A$ plus the number in $B$ plus the number in $C$. But the elements in the intersections have been counted many times. Let us subtract the number of elements in pairwise intersections. This makes elements in the intersections $A\cap B$, $A\cap C$, $B\cap C$ to be counted once. But now the elements in $A\cap B\cap C$ have been subtracted completely because they were counted in all pairwise intersections. We add them back. We add the number of elements in $A\cap B\cap C$.