If you are thinking of the modern flush toilet, it was invented by Sir John Harrington in 1596 and was named after him - they say that's why it's called a "john". What a way to go down in history! It's believed he presented one to Queen Elizabeth I, who was his godmother, but she said it was too noisy.
A Yorkshireman called Joseph Bramah patented a relatively modern-style water-closet in the 18th Century. Sir Thomas Crapper did not invent the flush toilet, though lots of people believe he did.
However, earlier versions of flush toilets existed as far back as 26 centuries BC and later were used by Ancient Greeks. The Romans also had them.
If you are thinking of waste-disposal systems in general, they go back a heck of a lot further - as far back as neolithic times when clever tribes channeled their waste products towards rivers that led to the sea.