Vayikra18:5

וּשְׁמַרְתֶּם אֶת־חֻקֹּתַי וְאֶת־מִשְׁפָּטַי אֲשֶׁר יַעֲשֶׂה אֹתָם הָאָדָם וָחַי בָּהֶם אֲנִי יְהוָה׃

You shall keep My statutes and My judgements, which a person shall do and live by them. I am the Eternal.

Vayikra 18:5

וּשְׁמַרְתֶּם אֶת־חֻקֹּתַי וְאֶת־מִשְׁפָּטַי

Vayikra / Leviticus 18:5

וּשְׁמַרְתֶּם אֶת־חֻקֹּתַי וְאֶת־מִשְׁפָּטַי אֲשֶׁר יַעֲשֶׂה אֹתָם הָאָדָם וָחַי בָּהֶם אֲנִי יְהוָה׃

You shall keep My statutes and My judgements, which a person shall do and live by them. I am the Eternal.

Pshat פְּשָׁט

And live by them

Rashi: "you shall keep My statutes" includes all the details of the section that Scripture did not spell out. "And live by them" is said of the world to come, for in this world a person dies in the end. Rashbam: "and live by them", and one who does not do them will be cut off from his people.

How Rashi and Rashbam explain it

Remez רֶמֶז

The future tense

Sefat Emet: Rashi says "in the world to come", and Ramban that by his deeds a person earns life, like Eliyahu (Elijah) and Chanoch (Enoch). Before the sin of the first man everything could be fulfilled without death, and so it will be in the future. That is why it says "shall do", in the future tense. Ba'al HaTurim: right after "live by them" it says "do not come near to uncover nakedness", because for the sake of life one may break almost any commandment, but not this ban.

How Sefat Emet and Kitzur Ba'al HaTurim explain it

Drash דְּרָשׁ

To live, not to die

The Tosefta: Rabbi Acha in the name of Rabbi Akiva: if to save a life even in doubt one may kill a thief, then all the more so to save a life in doubt one may break Shabbat. The commandments were given to live by them, "and not to die by them", and nothing stands before saving a life except three bans. Midrash Lekach Tov: "I am the Eternal" means He is faithful to pay the reward. "My judgements" are the commandments the nations object to, such as the ban on sha'atnez and pork.

How Tosefta, Shabbat and Midrash Lekach Tov explain it

Sod סוֹד

The life force of a commandment

Ba'al Shem Tov: idle words give the body no life force, because there is none in them. But when a person studies Torah in awe and love, great life force enters the body, and it grows heavy, as after eating. Sefat Emet: the deeds of Israel should not resemble the deeds of those for whom everything is only for the body. Every deed, even eating and drinking, should be made holy and bound to the root of life, and then a person draws life force from the commandments: "and live by them".

How Ba'al Shem Tov and Sefat Emet explain it