Shit happens is a slang sentence that is used as a simple existential observation that life is full of unfortunate unpredictable events, similar to "c'est la vie". The sentence is an acknowledgment that bad things happen to people seemingly for no particular reason.[1][2]
It can also be said less vulgarly, including phrases such as "it happens" or "stuff happens".[3]