We have to be very careful when translating set phrases or idioms, as they mustn't be translated word by word, otherwise they'll lose their real meaning. What do we have to know about English idioms?
First of all, that they usually follow one of these structures:
VERB+OBJECT/COMPLEMENT: pull someone's leg tomar el pelo
PREPOSITIONAL PHRASE: in the doghouse castigado
NOUN PHRASE: a piece of cake pan comido
AS+ADJECTIVE+ AS: as blind as a bat ciego como un topo
LIKE + NOUN: like a fish out of water como pez fuera del agua
WORD +AND + WORD: safe and sound sano y salvo
SENTENCE: to cut a long story short en resumen
You have to be able to learn as many idioms as possible. It's a way of sounding like a native English speaker and it will be very useful to improve both your memory and your vocabulary. Try and find some more!