I'm a former social worker with years of experience with the homeless. First thing to do is determine what type of homeless you are.
"Technically" homeless. Meaning you don't have your own house or apartment where you pay rent. But, you have friends and/or family who are willing to house you until you're back on your feet. if this is you, your priority should be to find employment. But be sure to apply for food stamps. You need to be able to feed yourself while looking for work, and if you can buy your own groceries, that's less of a strain on the friend/family member you're staying with. And don't be prideful when looking for work. Too many people think they're too good to flip burgers, like it's beneath them. But guess what? Those burger flippers are getting paid, and you're not. Once you find work, save your money. Too many times a client of mine would find work, get that first pay check and go stay at a hotel. Know what happened to them? Within a week they were broke and back in the shelter. Save at least enough for a couple months' rent and groceries before you move into a new place.
Then there's the other kind of homeless -- the kind most people think of when they hear the phrase. You're destitute. Nowhere to stay, no friends or family willing or able to take you in, sleeping on the street (or in your car), no money, no job, nothing. If this is you, get yourself to a shelter immediately. If you don't know where any shelters are, ask around. Go to your public library. Lots of homeless people hang out in libraries, because it's better than sitting on the street all day and you don't have to pay to get in. Once you get to a shelter, ask what kind of case management they provide. If they're a residential shelter -- meaning you're given a bunk and are allowed to come and go as you please -- it's worth looking into possible therapy. Most destitute homeless suffer from varying degrees of depression, and true depression requires treatment of some type. If you suffer from depression, therapy should be your priority. If not, then your priority should be the same as if you were the above type of homeless. A job and income. Some shelters only allow you to sleep at night, then put you out the next day and you have to go back again that night and get readmitted. A lot of these types of shelters work on a first come/first serve basis, so make sure you're back at least fifteen minutes head of when they start admitting for the night.
Best of luck to you. Take care of yourself.