A serious foundation problem can quickly turn into an expensive nightmare. Most buyers realize this and will simply walk away or at best, won't purchase the home until it's been properly repaired.
If you notice cracks, bowing or anything else that looks suspicious, you'll want to determine how serious it might be. It's strongly recommended that you have the foundation inspected by a qualified professional.
Foundation cracks are caused by hydrostatic pressure as water soaks into the earth around the base of the house. The foundation sinks as water from the gutters spills out and puddles around the house putting pressure against the foundation wall which causes cracks that make the house settle more than it should.
Indications of a house with possible foundation problems include unlevel floors, windows and doors that are hard to open/shut and diagonal cracks on the wall around the corners of doors and windows. It's important to keep in mind though that most houses have cracks and defects which are purely cosmetic.
If you're selling a home with a foundation problem, it's best to get it fixed beforehand as a questionable foundation problem can often squash a sale. If you don't plan on getting it fixed, at least get a quote so you're able to show potential buyers how much the repairs will cost.