You are contractually required to work your notice period (unless your contract says otherwise). You continue to be paid as normal.
In practice, if you are being dismissed your employer will normally pay you a lump sum instead and allow you to leave immediately.
If the employer requires you to work your notice and you do not, the employer can treat this as unauthorised absence and will not normally have to pay you for the days you miss. In principle the employer could also sue you for any loss they suffer (for example, if they need to pay for cover).