there are two different ways:
1. the correct way.
you as a developer or as a team, use your experience in cryptography, economics, blockchain technology, and a couple of other stuff to create a new project. you usually code it from scratch and create the new coin.
when you do that, you just have to put the word out and the project will pick up and become popular on its own because it will be worth it.
you can invest in it in the early stages, mine it, or ... to be also involved with it and make a lot of money when your project becomes popular.
example: bitcoin! Satoshi is speculated to own nearly 1 million bitcoin because he was one of the people who mined bitcoin in early days. now it is worth $5,700,000,000 growing day by day.
2. the wrong or lazy way.
you have the smallest experience in programming, the technology, cryptography,... so you just copy paste some code and change a couple of variables making it look different and release it.
to advertise you have to spend a lot of money to trick others into believing your project has a future and fool them into buying it.
to make money you will have to run an ICO and/or premine the shit out of your coin then dump those coins when you get them and as soon as possible.
example: most altcoins