How to start a company:
1) Come up with an idea (one that can make money)
2) Build a prototype (hardware, software, whatever)
3) Get evidence that people want it
4) Further refine the prototype and start selling it
5) When you've sold your first thing you now have, "a company"
At some point in that path you'll probably want to
A) Register your company (usually before step 4)
B) Get a cofounder (usually some time before step 4)
C) Get investment (usually not until after step 3) to be able to grow faster