basically there are two types of methods for generating traffic on your website.
The on-page techniques involve improving your website content, focusing on popular keywords and thus improving the on-page experience of both the users and the search engine on your website, thus helping get more traffic on your website.
The off-page techniques involve, generating do-follow backlinks for your website from various sources, thus directing more and more people to your website.