This depends upon the case. Solicitors charge by the hour for their time.
If a case goes to court, it will be much more expensive. Preparing for, and attending, court hearings is time-consuming. For this reason, court proceedings are seen by many people as the last resort.
Court proceedings often involve barristers, who will also be paid by the hour or by the day.