Lay is a transitive verb describing the action of placing something in a horizontal position and always has an object (lay the ruler on the page). The participles of lay are laying (they are laying the carpet) and laid (she has laid the tool on the bench), and the past tense is laid (he laid the foundations).
Lie is an intransitive verb describing a state, position, or condition (the platform lies five miles off the coast) and is followed by a preposition (in, on, over, under, beneath, for example) or a prepositional phrase (south of the border, 200 metres below the surface, for example). The participles of lie are lying (the tools are lying on the bench) and lain (it had lain dormant for many years), and the past tense is lay (it lay beneath the surface).