/Difficulty like others, is simple. Here’s an example: /difficulty p = /difficulty peaceful. It sets the difficulty to peaceful. P = Peaceful, E = Easy, N = Normal, and H = hard. If you are on peaceful, no mobs will spawn neither loose hunger bars.
Easy: will lose hunger bars and mobs will spawn, but than it won’t take as much damage on normal or hard.
Normal: You will lose hunger bars, mobs will spawn, and you will take a little more damage than on Easy.
Hard: You take A lot more damage, hunger bars run out too. And finally, mobs spawn. Hard is also very difficult to survive.
Hardcore: Only in java Minecraft, you die once, then you cannot respawn. That’s why it is very hard to live long in hardcore. Even though hardcore is very hard to survive, gamers usually do hardcore, like survive 100 days in hardcore Minecraft. Because they want more views and it’s more challenging.
One more thing: you can change the difficulty in the settings and with commands, but only the admin can do it.