Click on the label icon at the top of the page you are editing
Add label
For attachments:
Select "..." on a published page
Select attachments
Click the label icon next to the attachment
Add your label
Space Labels
See Space Labels to learn about adding labels to a space as a "space category."
Adding labels can be done on the page level by user who has permissions to edit the page
In terms of formatting, labels need to be lower case with no spaces. Multiple labels can be added to once by adding a space between each label. Labels do accept underscore and hyphen.