In order to cast active skills, or abilities, players must enter casting mode by pressing the [F] keybind (hand swap key). When in casting mode, as long as you do not exit it by pressing [F] again, you may cast the skills you have bound by pressing any key from  to . Active skills players can cast are showed on the player action bar when in casting mode as seen on the following screenshot.
Players can't cast spells in creative mode.
Skill Slot Offset
You may notice the keys you need to press on the screenshot are not exactly all the keys from  to . Since the player's held item slot is currently the 4th slot of his hotbar, he cannot press  (Minecraft does not register useless slot swaps) and therefore he cannot cast the skill he bound to his 4th skill slot. This is why all the skill slots after the 4th slot have been offset by 1.
If the player holds his item in the 7th, 8th or 9th slot of his hotbar, there will be no offset.
RPG Hotbar Swap
If you enable the
hotbar-swap config option, players will be able to entirely swap the 9 items they have in their hotbar with the 9 items that they positioned right above their hotbar slots in their inventory, by holding sneak and pressing the [swap hand items] key. This option allows players to have a second item set to vary their playstyle, or just store some consumables like pots and be able to access them easily.