What are the titans?

In Attack on Titan, the Titans are gigantic man-eating humanoids that destroyed Eren Yeager's hometown and caused the death of his mother. The Titans cause humanity to live in cities surrounded by three enormous walls to protect themselves.