I got deported because I worked illegally in the States and they banned me for 5 years. This period ends later this year and I'd like to go back and visit my friends. Will they let me? What type of visa do I need?
You would need to show that your life circumstances have changed such that there is no probability of you
- overstaying your visa in the US
- seeking employment
- falling back onto public services (food stamps, medicaid, medi-Cal, public housing etc.)
- committing crimes or terror here (that's an easy one)
The way to show that is a well-established life in a country where you are lawfully present, which gives you high incentive to return to your life there, and also high disincentive to stay in the US. DavidSupportsMonica has an excellent answer describing what that looks like.
If you're still an itinerant free spirit, it ain't gonna happen.
Will they let me?
This depends whether you can prove you have a good income and you don't need to work. This also depends on you proving you will stay with your friends and that you have enough funds for your trip. No-one can say yes or no certainly but if you provide the right proof and obeyed your ban you do have a chance.
What type of visa do I need?
You need a B-2 visa:
B-2 visitor visas are nonimmigrant visas for persons travelling to the United States temporarily for tourism, pleasure or visiting.
US law regulating the issuance or refusal of visa applications requires the officer examining the application to presume that the applicant has immigrant intent. A successful visa application must disprove this presumption. Proving that something (here, an overstay) will not happen in the future is logically impossible, and in the real world very difficult.
The most powerful evidence is what @Harper - Reinstate Monica mentions as a well-established life. In other words, such strong ties to one's country of citizenship or residence that the applicant will not overstay in the US and will return home after the US visit. These factors can include the applicant's having ongoing, valuable, and long-term employment, owning a well-established business, the ownership or long-term lease or rental of real property where the applicant resides, and family connections such as children, parents, and a long-term spouse who rely on the applicant (both fiscally and emotionally) and to whom the applicant will thereby be compelled to return.
Personal bank accounts that reflect long-term, regular, and predictable deposits and withdrawals consistent with the applicant's claims of work, salary, and costs of living will be helpful.
Owning property in which the applicant doesn't live is much less persuasive, as is savings and other assets. All of these can be managed remotely or converted to cash and transferred internationally. They will add little or nothing to your application; given these assets' portability, they may well count against you.
Having friends or family in the US will weaken your application, as the examiner will see them as resources to support you if you overstay. Still, you must honestly answer all the questions on the visa application. If you do not and are found out by the examiner — and they have lots of resources to check on your answers — you will be banned permanently for misrepresentation.
Even if you demonstrate compelling reasons to return to your country of residence after the visit, as described in this answer, your application for a visitor visa may well be denied because of your US immigration history.
You will be eligible to apply for a visa, but you must still meet all the requirements to obtain one. For any nonimmigrant visa, such as the B-2 Visitor visa that would be appropriate in this case, one of those requirements is demonstrating nonimmigrant intent, and another is willingness to follow the immigration and criminal laws of the United States while you are there.
Although your ban period is up, you will have to convince the consular officer, who will absolutely have reviewed your removal case and past records, that you aren't going to do it again. You can make your case by showing "significant ties" to your home country such as a family and desirable job. But you will still have a hard case to make.
If you lied to immigration officials in the past (for example, if you intended to work in the US when you applied for the visa or entered the country, and they have reason to believe that is the case), you would have a lifetime ban for "material misrepresentation to obtain an immigration benefit."