If you exclude the meaning "to tell an untruth", which is a regular verb (to lie, lied, lied) and just focus on the setting/reclining meaning of lay and lie, then the important distinction is that lay requires a direct object and lie does not.
So you lie down on the sofa (no direct object), but you lay the book down on the table (the book is the direct object).

You lay something down, and people lie down by themselves.

Here are the rules for using Lay and Lie correctly:
Using the verbs lay and lie correctly is a big challenge. Without a doubt, they are the two most difficult irregular verbs. The problem is that when we speak, we frequently misuse them. As a result, our ears are used to hearing the verbs incorrectly. So when we see a wrong form while we are reading, it sounds perfectly right to us.
In order to help you, try to memorize this sentence:
How do you use lay and lie correctly?  First, you must know the definition of each verb.
  • LAY means to put or place something or someone down. Because lay is a transitive verb, a direct object will come after it. A direct object receives the action of the verb. Here is an example:
Sarah laid her son Brian on the bed and covered him with a quilt before returning to the living room. (Sarah laid whom on the bed? Brian.)
  • LIE, on the other hand, means to rest or recline. Lie is an intransitive verb, so no direct object will follow.
Emma's bed always smells like dog because Snoopy, her greyhound, lies there all the time. (What is Snoopy doing in the middle of the bed? He's resting.)
Once you know which meaning you need, you must then choose the correct verb form.