Running a successful website doesn't happen overnight. It takes a long time to learn how to do it right. Whether you're working for yourself or a client, you've got to do your absolute best. The definition of your best may vary, however. At least hold yourself to a standard that pleases clients.
Of course, then we're looking at a whole different beast. Marketing your website. If you made it for a client, well that's their problem. If it's your personal pet project, you need to think strategy. How are you going to get your site seen?
Let's go for the obvious answer first. Tell people about it. Harp on about it to your friends and family. Use social media to get the word out amongst your network. LinkedIn, Facebook, Twitter, any of them.
Even if you're asking them to visit, they're still a set of eyes on your creation. They could even have valuable feedback about it too. Don't ever turn down a free opinion. It could help you out amazingly.
Next, try asking about some SEO packages. SEO is a great way to build your base up. It'll raise your ranks on search engines. It should sustain you just until you have enough users to lift your rating organically.
This works through content created featuring your site link joined with search phrases. This means when those phrases are searched, you'll start appearing in the results. The more of this content across the web, the higher the relevancy rating.
A relevancy rating is how search engines determine what is relevant to the user's search. It's mostly based in math. This allows SEO to operate in the way it does. It would be impossible for people do the work the algorithms do, so SEO is safe as houses for the immediate future.
Probably the best way to get noticed online is to be linked to by another website. There's no real way to guarantee this. You just have to put content out that excites the few who see it, and hope they pass it on to someone with influence.
An influx of viewership can come from one of these. When you have that base, then you can make real moves to grow. Whether you're providing content or a service or selling a product, word of mouth is king.
What about when you're in a better financial position? Then you can resort to regular advertising. All the above still apply though. Resting on your laurels when you're popular is a recipe for decline.
You have to give people a reason to keep coming. More importantly, a reason to pass the site on to friends.
Try advertising outside your comfort zone. By that, I mean outside sites similar to yours. If you want fresh blood when it comes to visitors, you need to seek other demographics.
Never forget your core audience though. They built you, and they can take it away if they wanted.
Any of the above should bring you some measure of success. Web popularity isn't rocket science, but it's also not very predictable.