An idiom is a form of figurative language, in this case, using words in a way that their meaning can't be determined from the meaning of the words alone, which is what can make them problematic. There are so many idioms in existence that there are books devoted solely to listing them. Also, idioms are particular to geographical and cultural regions. An idiom that is well-known in Britain, for example, wouldn't necessarily be one that we in the United States would be able to grasp without explanation. Here are a few common idioms and their meanings:
If someone says, "He just got a slap on the wrist for what he did," he or she doesn't mean that someone literally slapped the offender on the wrist - it means that he got a very mild punishment for the offense committed.
Another person might say, "Break a leg!" to someone about to go on stage. This is not a cheery wish for a leg cast, rather it is a way to wish someone "good luck."