Foreclosure action query

Is the foreclosure action something that you can pay a lawyer to do, or do I need to go to court for the same to get done? Thank you all for taking the time to write all this and sharing your experiences and knowledge.