There's a question and a half!
Answer could fill thousands of books and courses. In a nutshell ( and probably missing kernel )
1. Add Loads of GOOD original copy to your site
2. Add even more.
3. Get the basics of SEO right - Titles and Tags and site performance.
4. Make sure you're in relevant directories and indexes.
5. Find as many people as you can, who have genuine, well ranked, relevant, websites and get them to write about you.
5. Go back to step 1 and repeat for several years.