The short answer to your question is that, once you have fallen out of status—meaning that your authorization to stay in the United States on a visa or some other document has expired—you are expected to depart the United States immediately. You are not eligible for a work permit, or indeed for any other immigration benefit. Your current visa will be automatically voided (under Section 222 of the Immigration and Nationality Act (I.N.A.)).
You also risk being denied future visas to travel to the United States, or to being barred from reentry to the United States for a certain period of time, as a penalty for your overstay.
If you entered the United States illegally, without a visa, then you never had any status in the first place, so most of the discussion in this article will not apply to you.
Before worrying that you must leave the U.S. right away, make sure you understand the date by which you are expected to depart. That date should be shown on your I-94 Arrival-Departure Record, which could be either a small white or green card that was tucked into your passport when you entered the United States or you can obtain it from the website of Customs and Border Protection (CBP).
Notice that that the I-94 shows a different date than was on your original visa. A visa expiration date refers to the last date on which you can use the visa to enter the United States, but tells you nothing about how long you can stay in the United States once you're there.
If you entered the United States as a student, your visa might say "D/S" instead of a date. That means "duration of status," which means that you may stay for as long as it takes to complete your studies.
In many U.S. visa categories, you can renew or extend your status by submitting an application to USCIS. The form that's usually used for this is called an I-539.
If renewals are allowed in your visa category, make sure to apply well ahead of time, so that you don't fall out of status. Once you reach the expiration date on your I-94, or are otherwise out of status, you can't file for an extension.
You might also be able to change your status, for example from student to H-1B worker.
If your authorized U.S. stay has ended and you are simply wishing you could stay around longer and find a job, you're probably out of luck.
Before applying for a work permit, you would need some sort of underlying basis of eligibility, such as a job offer from a U.S. employer that is willing to help you get a temporary visa or green card, or immediate eligibility for a green card through a family member. Even if you are eligible for some sort of visa or green card, having stayed in the United States illegally could make it difficult for you to successfully complete the application process.
Nevertheless, many exceptions exist within the world of immigration law. So, if you believe that you are eligible for some sort of temporary visa or permanent green card, speak to an experienced immigration attorney.
Immigration laws are insanely complicated. An immigration attorney can help you analyze your situation, and if possible, help you to remain in the United States legally and obtain a work permit.