When you need to free up an Advanced User License you can do one of two things:
1. Make the Advanced User Inactive. Go to the Object Manager, select the User you want to deactivate and double click open it. You will find a button to make it inactive.
2. Turn the Advanced User into a Web User (only if you have a Web User license left).
When needing to free up a Web User License you can do one of two things, this will depend on if the Web User is a User or a Resource.
1. If the license is being used by a User then you will need to make the User Inactive.
2. If the license is being used by a Resource then you will need to Un-tick the Web Access box in their Contact.