Minecraft is split into clientside and serverside code from the ground up.
However, if you launch a world in singleplayer that starts an integrated server, i.e. a server on your local machine that has just one single slot.
Due to because it's still a single instance of the game you can still access the full client from the server and vice versa, which you wouldn't be able to if the client was connected to a dedicated (i.e. physical) server.
It's properly explained in the official Forge Documentation ;D