Even if the judge orders deportation to your home country, you may be able to file an appeal. An appeal goes to the Board of Immigration Appeals (BIA), where officials look at your case objectively, without referencing your court hearing, and determine if the immigration judge should have decided differently. You have 30 days after your hearing to file an appeal. However, if you make a declaration in court that you have no plans to file an appeal, this waives your right to do so.
The BIA is the highest administrative court for applying immigration laws. Making an appeal to the BIA is not another court case; rather, the board members make a determination on your appeal by performing a paper review of your case. Your attorney will advise if you have a chance of securing an appeal and if this approach is your best course of action.