"Cuss" Words

how did words such as s— and f— originate and who decided they were bad? where’s the line between “poopy”, “crap”, and “s—”?.

my sister’s eleventh grade history teacher said there was a group of people called vulgarians (hence the word “vulgar”) who were hated by other people (kinda like the samaritans were in the new testament) for some reason who used these words as an ordinary part of their language; so the language itself was hated. but i’ve been told that’s just a myth. if that’s not true, what is?