Shit is a vernacular word in Modern English denoting feces, the byproduct of digestion.
It is an old and native English word, but following the Norman Conquest, Norman, Anglo-Norman, French, and Latin terms for many common objects and bodily functions began to be seen as more distinguished than native words.
Thereafter feces became the accepted English noun, to defecate became the accepted English verb, and shit was no longer used in polite company.
It is therefore a swear word and can be classed as a use of ‘slang’, for example, ‘Shit!’. Though it can often be used in a non-pejorative manner, as in the slang: ‘that’s the shit’ to mean ‘that’s good’. The term ‘shit’ can also be used to describe poor conditions, for example, ‘That is rather shitty!’.