A non-flake version of documentation on Nix shell can be found here.
direnv: manage dev environments
direnv (along with nix-direnv) allows one to persist* nix development shell environments and share them seamlessly with text editors and IDEs. It obviates having to run nix develop manually every time you open a new terminal. The moment you cd into your project directory, the devshell is automatically activated, thanks to direnv.
Like packages, another predefined flake output is devShells - which is used to provide a development shell aka. a nix shell or devshell. A devshell is a sandboxed environment containing the packages and other shell environment you specify. nixpkgs provides a function called mkShell that can be used to create devshells.
One of the superpowers of Nix is that it enables us to create isolated shell environments containing just the packages we need.