In short
Localhost means "this computer", and a development server (dev server) is a program that runs your website locally so only you can see it while you build. When you run a command like "npm run dev", it starts a dev server and prints an address such as localhost:3000. Opening that address shows your site, but it lives only on your machine and nobody else on the internet can reach it. That is exactly what you want before you are ready to go public.
What localhost and the port mean
A localhost address looks like localhost:3000. "localhost" always means your own computer, and the number after the colon (the port) is just which door the dev server is listening on. Different tools use different ports, so seeing 3000, 5173 or similar is normal and nothing to worry about.
Why the dev server is special
A dev server does more than show your site. It watches your files and refreshes the page the instant you save a change, which is what makes web building feel fast. Because it keeps running and watching, the command does not "finish" and return you to a prompt; that is normal, not a hang.
Local is not the same as live
A site on localhost is not on the internet. Sharing the localhost link with a friend will not work for them, because the address only means "this computer" on each machine. To put your site online you deploy it to a host like Vercel, which gives you a real public URL anyone can open.
Common beginner confusions
A classic one is the "port already in use" message, which simply means a dev server is still running from before. The fix is to stop the old one (Ctrl and C in its terminal) or let the tool pick the next free port. Another is expecting changes to appear without a running dev server; if you close the terminal, the local site stops, which is normal. People also confuse the dev server with the production build. The dev server is optimised for fast feedback while you work, not for real visitors, so a live site is built and deployed separately. None of this needs memorising, but recognising "local" versus "live" early saves a lot of head-scratching the first time something does not behave the way you expect.
