That's an ancient mythology riddle from the Sphinx to Oedipus. The Sphinx would ask that riddle to any traveler entering (or leaving the city of Thebes) and when they got the answer wrong the Sphinx would devour them.
Oedipus answered the riddle and the Sphinx lept to its death.
The answer was "man."