If you are convicted, you are usually required to pay all the costs of the case. You can read about case costs here. The costs of the case will primarily comprise your defence counsel expenses (the fee).
If you had an appointed defence counsel, the state will initially pay the defence counsel fee. However, the state will subsequently recover the amount from you. The fee for the appointed defence counsel is normally calculated on the basis of fixed rates.
If you had a privately retained defence counsel, you must pay the defence counsel directly. The fee amount depends on the agreement you made with your defence counsel. Read about privately retained defence counsels.
If you are acquitted, you are not required to pay the costs of your appointed defence counsel. The state will pay the costs. However, the general rule is that you have to pay a privately retained defence counsel yourself – even if you are acquitted. In some situations, the court may decide, however, that you will not have to pay (all) the costs of your privately retained defence counsel if you are acquitted.