Some people in removal proceedings may be eligible for what is called voluntary departure. This is when the Immigration Judge allows you to leave the country on your own free will by a particular date.
If you lose your immigration case or if your case is very weak then you may want to discuss voluntary departure as an alternative to being deported.
There are significant advantages to voluntary departure as opposed to being deported. Most importantly, you will not have the prior deportation order that bars you from reentering the US for 10- 20 years, you will not be taken into immigration custody, it will be much easier for you to immigrate legally into the US later.