There are lots of things you can do to investigate and prepare.
Start by talking to an independent mortgage broker, they will work with many different lenders and will know which lenders might have programs for you.
Check with your state, there might be a low income or first time homebuyer program. For example, New York has a program where, if you make small monthly deposits to a savings account, and take some classes on money management and home ownership, the state will match your deposit for closing costs. New York also has a low income homebuyer program with favorable interest rates and low down payment requirements.
Do whatever you can to improve your credit by paying off loans and credit cards. You probably won't qualify for a mortgage unless all your debt payments (all loans, credit cards and the new mortgage) will be less than 38% of your monthly income (some say 43%, but not with poor credit).
Are you flexible about where you live? Some cities may offer incentives like down payment assistance or low rates to buy in areas that are in need of good neighbors.
You may need to wait until you can both pay off your debts and save for a downpayment. That may be the unfortunate reality.
*Answers are correct to the best of my ability but do not constitute legal or tax advice.* **If a post answers your question, choose it by clicking on "Mark as Best Answer".**