Primary keyword is the most important keyword on a web page, since it's used before the other keywords on a web page. Besides of content (better to add ot to the first sentence on page) it should also be included in a site’s title and preferably in domain name.
Therefore, primary keyword is crucial in SEO because it is used to explain the web page and helps people to find the site.
Secondary keywords does not have much influence on SEO, but still it may attract some visitors, so you don't want to completely ignore them.
There also is such thing as LSI keywords, where LSI stands for latent semantic indexing - it's description of words that are commonly found together within a single topic and are semantically related to each other. Word is that they can be also helpful to optimize the page for SE, but idk for sure.