The Rambam [Hil' Chometz U'matzah 7:6-7] writes that each person is supposed to view himself as if he personally was a slave who has been freed from Mitzrayim. Therefore, we are required to eat and drink while reclining to act like a free man (Shulchan Aruch 472:2).
The opinion of the Ravyah is that nowadays since people generally do not lean while eating, one is not required to lean (Mishneh Berurah 472:12). L'halachah one is required to lean, however, women are not required to lean because they can rely on the Ravyah's opinion (Rama 472:4). It is important to note, if a woman wants to lean, she may, and it is considered praiseworthy (Kaf Hachaim 472:28). The Sefer Shloshim Yom Kodem Hachag [pg. 91 ftnt. 37] writes that many wives of Gedolim [including the Chasam Sofer, Chazon Ish and Steipler Goan] did lean. A child who has reached the age of chinuch, should lean (Koveitz Halachos 21:12).
There are certain people who are not allowed to lean, since it is not considered proper to lean in front of specific people. A student who is in his Rebbe's presence, even if this is not his primary teacher, should not lean (Shulchan Aruch 472:5), since he should have an awe of his Rebbe, comparable to awe of heaven (Mishneh Berurah 472:15). The same halachah applies if one is in the presence of a great Talmud Chacham even if he is not his Rebbe. If the Rebbe verbalizes that he is forgoing his own honor, than the student is required to lean (Shulchan Aruch 472:5). A son is required to lean in front of his father, even if his father is his primary teacher (Shulchan Aruch 472:5), since one's father most probably will forgo his honor (Mishneh Berurah 472:14). The same applies for a son in the presence of his mother (Dirshu MB quoting Harav Y.S. Eliyashuv, zt"l). An avel (mourner) is required to lean (Mishneh Berurah 472:13).
To be considered leaning, one needs to lean both his head and body towards his left side, on a pillow or bed (Mishneh Berurah 472:7). If one does not have any pillows [e.g. a poor person] he should lean on what he is sitting on [e.g. a chair or bench]. A person should not lean on his right side (Shulchan Aruch 472:3), either because it is not considered cheirus to lean on your stronger side or out of concern that the food will go down the trachea and not the esophagus (Mishneh Berurah 472:10). A left-handed person must also lean on his left (Rama 472:3).
One is required to lean while drinking the daled kosos (Shulchan Aruch 475:7) eating motzai matzah, korech (Shulchan Aruch 475:1) and the Afikomen (Shulchan Aruch 477:1). There is a machlokes whether one needs to lean by karpas. Most Poskim hold that one does not (Kaf Hachaim 473:114). One is not required to lean while eating maror (Shulchan Aruch 475:1), since it is a remembrance of the slavery in Egypt (Mishneh Berurah 475:14). If one wants to lean while eating maror, he may (Mishneh Berurah 475:14).
The Rama [472:7] writes it is preferable to recline while eating and drinking during Shulchan Aruch. L'maaseh, the minhag nowadays is not to (Halichos Shlomo 9: Orchos Rabbeinu: 135). This was the practice of many Gedolim of the previous generations, including Harav Moshe Feinstein, Chazon Ish, Steipler Goan and Harav S.Z. Auerbach, zt"l (Koveitz Halachos 21:ftnt. 5).
If one did not lean while drinking the second cup of daled kosos, he should drink another cup, without making the brachah. If it happened on the third or fourth cup, one should not drink again (Rama 472:7). Regarding the first cup [Kiddush], if one had in mind before drinking the first cup to drink wine in between the first and second cups, he should drink the cup again. If not, he should not (Mishneh Berurah 472:21). If one did not lean when eating matzah, he must eat one kzayis (Mishneh Berurah 472:22) of matzah again without a brachah (Shulchan Aruch & Rama 472:7). It suffices to eat the smaller shiur for kzayis [the amount for mitzvos mederabban since he fulfilled his mitzvah me'deoraisa] (Koveitz Halachos 21:22).
If one did not lean by korech, he does not need to eat again (Koveitz Halachos 21:23 quoting Pri Chadash). If one did not lean while eating the Afikomen, according to many Poskim, he does not need to eat again (Aruch Hashulchan 477:4). The opinion of the Mishneh Berurah is unclear (see 472:22 & 477:4).