You may then tell the judge everything that happened.
The judge may ask you questions. You must answer them.
The judge will tell you how much money to pay as a fine or what sentence you must serve. Before you plead guilty, you have the right to ask the judge if you will go to jail.
Some of the money you pay is a fine, turned over to the government.
Some of the money you pay is for court costs for the operation of the court system.