You can drag and drop files and folders to move them to new locations in a document library. This is no different than the file explorer in Windows.
This is great when you want to move a file into a subfolder. But what might not be obvious is that you can drag and drop items into the folder navigation breadcrumbs to move them up to the root folder.