It is possible for an illegal alien to obtain legal status through marriage to a U.S. citizen without leaving the U.S. but it depends upon the immigration history of the illegal alien. An immigration attorney would need to review information about how the alien entered the U.S. and whether and when any immigration paperwork has been filed for him or her previously. to properly advise the alien and spouse as to his or her options. Consult with an immigration attorney before taking any action.
The answer to this question would depend on several factors. One important factor would be what you mean by "illegal alien." If you mean that the person entered the U.S. without a valid visa then his opportunities to adjust status will be severely limited. If however you mean that the person entered the U.S. on valid visa status and then overstayed the visa then this is a different situation.
What is certain however is that merely marrying a U.S. Citizen does not automatically make a person a legal resident of the U.S. It is therefore advisable to seek specific legal advice from an immigration attorney as the detailed facts of your case are extremely important.