In development, many do work on it live. Some though prefer to work on the Local Server on their PC's.
They work on it live by making sub-domains like testenvironment.mydomain.com and maybe restricting access to it to IPs from the LAN at work, developers home IPs so that they can work from home. You can also simply make a sub-directory and restrict access to it. Many new websites don't bother to have restrictions as they have never been discovered before.