In simple words an idiom is a simple phrase that means slightly different from its real meaning but it could be understood by its common usage or popularity.
Examples: its a piece of cake for me meaning something that is very easy.
Its raining cats and dogs meaning that it is raining heavily.