As someone who is technically homeless in the United States I can say it's a combination of things, really, and it's different for each individual. For some of us it's mental illness that hinders good job growth and a lack of mental health/physical health care that keeps us down. For others it's addiction and the way that influences/changes the brain - placing the goal of getting 'a fix' higher than even eating or sleeping safely. And for a good number of homeless, it was the event of a tragedy they hadn't planned on - losing a job, serious illness and the mountains of medical bills that followed, abusive family members that kicked them out as a minor, a system that refuses to take care of or rehabilitate its veterans and convicts.
A solution would be better funding/quality of homeless shelters that aim to help people get back on their feet - providing job opportunities, decent clothing for interviews, help with applications and finding housing. Better access to mental health care, more rehab facilities that are affordable and effective. A lot of these things would go a long way towards ending poverty and homelessness, but society doesn't care about these people and would rather turn a blind eye.