There are a lot of methods through which you can understand the context of the idiom rather than cramming it. The best way to prepare for idioms is to understand the context or situation where a particular idiom is used. Whenever you read an idiom and go through its meaning, try to link that idiom with a particular situation or context in your knowledge so that whenever that word comes up again, you have a glimpse of the situation.