First of all, you have to have a basis to apply for lawful permanent residency. If you don't have a basis to apply then you don't have any options. Since this site only deals with family-based immigration issues I will only discuss those options. There may be other paths to lawful permanent residency through employment. So, in order to stay in the U.S. and obtain residency here you would have to be an immediate relative of a U.S. Citizen (spouse, child (unmarried and under 21), or parent. You must also have entered the country legally.