I get confused between the verbs legen and liegen. I would appreciate some explantation on the meaning of the two verbs, preferably with examples. Also, are there context where te two verbs are synonymous?
The difference is that
But if you were talking about placing the rug on the floor, you would say:
In the first example, notice that you use the indirect to describe the location, but in the second you would use the accusative for both the object being positioned and the location.
Glenn's answer is pretty much spot on. I would like to add that when you place something such that it has a tendency to be tipped over (vase etc) 'stellen' is more appropriate than 'legen'. But yes, the pairs liegen/legen & stehen/stellen are analogous.
As per their usage in a sentence, legen is a Bewegungsverb (movement verb) like 'gehen' and liegen is Nicht-Bewegungsverb (non-movement verb) like 'schlafen'. Therefore, you have to use accusative and dative cases in Wechselpräposition as well as 'sein' and 'haben' as helping verbs in perfect form respectively.