If you have entered the United States without permission, or stayed here beyond the expiration date of an I-94 (after entering the U.S. on a visa) or other permitted stay, then you are considered an "undocumented" or "illegal" immigrant. Yet returning home might not feel like a safe option for you, either. Applying for a protective form of relief called asylum might be possible, if you fear returning to your home country and do not have residency rights in any other country.
The fact that you are in the U.S. illegally is no bar to applying for asylum. You would need to either submit an application on your own (an "affirmative" application), within certain time limits, or if you are caught by the immigration authorities, apply for asylum during your immigration court hearing.
Applying affirmatively offers many advantages. It means that the first hearing on your claim would not be in immigration court (also called the "Executive Office for Immigration Review" or "EOIR"), and you wouldn't face cross-examination by a government attorney. Instead, you'd meet one-on-one with a trained asylum officer, who would listen to your account of what happened and what you fear, and could approve your claim. And if the officer denied your claim, you'd still be able to make the same claim again in immigration court.
Also, applying affirmatively increases the chances that you won't miss the one-year deadline on applying for asylum, described below.
In order to be granted asylum, one must first be able to prove eligibility for refugee status. Very briefly summarized, this means that the applicant can prove having been persecuted, or a likelihood of being persecuted in the future, by either the government of the person's home country or by a group beyond the government's control. Examples of persecution include torture, discrimination, threats of injury or death, or imprisonment. (See 8 U.S.C. Section 1158.)
In addition, the persecution must be on account of one of five grounds: either the person's race, nationality, religion, political opinion, or participation in a particular social group. That means, for example, that if the local police chief harassed you because you're dating his daughter and he disapproves, you would not qualify for asylum, because his reasoning is personal, with no connection or "nexus" to one of the five grounds.
For more about eligibility for asylum, see Who Is Eligible for Asylum or Refugee Protection in The U.S.?
To apply for asylum, you must submit Form I-589, Application for Asylum and Withholding of Removal, issued by U.S. Citizenship and Immigration Services (USCIS). Along with the form, you must submit documents, affidavits, and any evidence you have proving who you are and what persecution you (and your family, if any) faced in the past or would face in the future in your home country.
Even if you don't have many documents of your own, you should add documents created by others that are relevant, such as human rights reports and newspaper articles proving that your experience is similar to that faced by other people in your country.
There's a time limit: you must file all the necessary documentation within one year of entrance to the United States or of the expiration of your permitted U.S. stay.
The instructions that come with Form I-589 tell you what to do from a procedural standpoint. However, you'd be well advised to get an attorney's help with this process. Proving that you truly fit the grounds for eligibility, and aren't just making up a story, requires a lot of preparation and effort. It's not uncommon for attorneys to submit a packet of materials that is at least one inch thick, and to help the client write a summary of their story that is several pages long.
Within 60 days of receiving your application, USCIS should conduct an interview to review your application and hear your personal testimony. Lately, however, the agency has been extremely backlogged, so whether your case is heard this soon depends on its current policy regarding which applications to deal with first, as well as its staffing levels.
You will not receive the decision the day of your interview, but will be asked to return at a later day to find out whether your request for asylum was granted. If granted, you will receive evidence of your approved status, and will be able to apply for a work permit, then for a green card after one year.
If your case is not approved, you will be referred to removal (deportation) proceedings, which will begin in just a few weeks.
As we've already mentioned, if you are seeking asylum status, it is a good idea to consult with an experienced immigration attorney. Your attorney can help you gather evidence and prepare for the asylum interview, thus increasing your chances of being successful the first time around. And if your case has been referred to immigration court, you definitely want a lawyer's help.