An idiom is a fun and useful expresion whose meaning is different from the meanings of each word in it. For example, when you say that something is 'a piece of cake' it means that it's an easy thing to do. So, they should be learnt as a whole.
Idioms are used a lot in everyday English. They make a conversation more interesting.
For a list of English idioms go here or here.