I came to the U.S. on a work visa, then got laid off, but I didn't leave the United States because I was dating an American citizen. Now, about two years later, we have gotten married and are pregnant, and she wants to start the green card application process for me. I keep hearing that people who were "unlawfully present" in the U.S. need a waiver on Form I-601 or I-601A. Do I need to apply for one of those?
What you heard was only half right. People applying for green cards who have been unlawfully present in the U.S.--which it sounds like you have been--become inadmissible to the U.S. (for ten years, if their unlawful stay was one year or more). Those who are eligible for a green card (which it also sounds like you are, based on your bona fide marriage to a U.S. citizen) would need to apply for a waiver of that inadmissibility if they have left the U.S. and seek to return.
But why would you leave the U.S. and thus trigger this ten-year period of inadmissibility? The answer for many people in similar shoes to yours is, "Because I need to go attend my immigrant visa/green card interview at the U.S. consulate."
You, however, have another option, which isn't open to everyone: It appears you are eligible to "adjust status," that is, submit your application to, and more importantly attend your interview at, an office of U.S. Citizenship and Immigration Services (USCIS), all without leaving the United States.
Why is this option available to you and not to others? Because you:
Your unlawful presence does not make a difference in your eligibility to use this U.S.-based adjustment of status procedure.
(But anyone reading this who entered the U.S. without permission or inspection, or whose green card eligibility is based on a family or employment relationship that puts them in the "visa preference" category, with a "priority date," is probably not eligible for adjustment of status, and will have to go the consular interview outside the United States.)
The bottom line: Choose to apply via adjustment of status rather than consular processing, and you will not need to file an I-601 waiver.
For more information, see the Marriage-Based Visas and Green Cards section of Nolo's website or get the book Fiance and Marriage Visas: A Couple's Guide to U.S. Immigration, by Ilona Bray (Nolo), which contains comprehensive, easy-to-understand instructions on eligibility and application procedures.