Why does my foundation look a different shade?

why is everytime i put on my foundation its either a perfect match or doesnt match at all? is it my skin or the skin or what?