Do an object and name it dashes like :
--------------
That creates a folder
Technically you just need to place a single dash in front of the name. You can create groups in most tabs of the editor, but there are some exceptions where you shouldn't create them (see #2).
Quick note #1: they aren't actually groups/folders, they just make it so that everything in between them & the next group block can be folded/unfolded. If you were to drag the group it would just move that in the list only & not anything listed below it. It's purely for tidying up & organizing your projects so that everything is a bit easier to find.
Quick note #2: do NOT use this feature on scene objects as those need to be organized based on their object center values otherwise weird draw issues can occur.