To begin with, the exact meaning of idiom is an expression whose meaning is not predictable from the usual meanings of its constituent elements. I will show you some examples of idioms and how each of them is used in a sentence.
1) Best of both worlds
Meaning: A situation in which you can enjoy the advantages of two very different things at the same time.
Example: She wanted to become a doctor but she wasn’t ready to leave her family and stay in a hostel. She couldn’t get the best of both worlds.
2) Speak of the devil
Meaning: A reference to someone who appears unexpectedly while being talked about.
“Did you see Diana today?”
“Oh, here she is!”
“Well, speak of the devil!”
3) Wing it
Meaning: To do something with no preparation.
Example: I was out last night partying with my friends, so the quiz today, I had to just wing it.
4) So done with
Meaning: Frustrated and bored by something.
Example: I am so done with studying physics all day.
5) Once in a blue moon
Meaning: Very rarely
Example: My younger brother would study chemistry only once in a blue moon.
6) A piece of cake
Meaning: Something that is very easily achieved.
Example: “The exam was a piece of cake.” I told my mom.
7) See eye to eye
Meaning: To be in full agreement with someone.
Example: My co-workers and I, not always see eye to eye.
8) To kill two birds with one stone
Meaning: Achieve two aims at once
Example: Walking to work kills two birds with one stone. Saves cost of traveling and give you some exercise as well.
9) When pigs fly
Meaning: Something that will never happen.
Example: I think he might apologize to you when pigs fly.
10) It beats me
Meaning: Is used when you don’t understand a situation or someone’s behavior.
Example: It beats me how she passed her exams without even touching her books for the whole year!