What is the difference between an idiom and a metaphor?

An idiom is a popular fixed phrase that describes a thing or situation (e.g., “Slow and steady wins the race”).

A metaphor is a statement that directly compares two dissimilar things or situations (e.g., “All the world’s a stage”).

An idiom can be a metaphor, but not all idioms are metaphors.