A figure of speech is an expression whose words are arranged for effect rather than plain information. Sometimes that effect comes from non-literal meaning, and sometimes it comes from sound or structure, such as a phrase built around alliteration or a repeated pattern. It's raining cats and dogs means heavy rain, not animals falling from the sky.
A simile is a comparison of two unlike things that usually uses the word like or as. My daughter is as red as a tomato after her run in the sun. She is not really a tomato, of course; the word as makes the playful comparison, while the run in the sun explains why she looks so red.
- Similes usually lean on like or as. His insults cut like a knife. The word like shows how his words feel, without claiming they are a knife.
A nearby confusion is the metaphor, which skips like or as and states one thing is another. Her smile is sunshine is a metaphor; Her smile is like sunshine is a simile. The difference is often just one word, and which one to use is up to the writer or speaker.
So if you spot a comparison, check for like or as to tell the two apart. Both compare two things without meaning it literally; only the wording changes.