If you are in foreclosure then you need to find out if it is backed by Freddie Mac, Fannie Mae of HUD (FHA). You can visit: freddiemac.com, fanniemae.com or hud.gov. You can also call the federally funded HOPE for home owner's line for advice: 888-995-4673.
If your loan is a "portfolio" loan, meaning the bank owns the note then you will need to call the bank / lender and ask them if they would consider working with you to modify. I would advise against paying a loan modification company to help you. There are many free services and resources out there for home owners these days. Many modifications company are fraudulent and you don't want to make a bad situation worse.