Keywords form the gist of Chapter 5 of Michael Miller's The Complete Idiot's Guide to SEO, immediately following Content.
If Content is viewed as a wheel in motion, ferrying you to places, then keywords would be the spokes that radiate out from the center hub. They are essential for motion, but one can readily observe that the number of spokes is just adequate for the purpose at hand: too few and the wheel will become rickety; too many it makes a solid wheel, lacking the spatial mix that renders it attractive.
Of course coming up with a list of relevant, and hopefully highly searchable, words is just the beginning. But it's a huge beginning. You would think that coming up with the list is intuitive. After all we do this everyday, looking up stuff online.
Long before these web search keywords come into vogue, the academic community is already using the system in printed journals for the ease of indexing and sourcing relevant journal articles. Drive along an urban road, you can see giant billboards of an advertisement, feasting your eyes with countless keywords that could practically last a life time. However, this mental imprints do not stay long in the mind, or they are quickly shoved off to the deep recesses of the memory bank, being pushed into oblivion by new arrivals.
Hence, the keyword trackers or research tools that will do the memorizing, and also prompting, for you. They are supposedly based on what users actually type in the query box. They can also do the reverse by back-tracing to the original search terms if you want to know how successful articles were searched.
Once the proper list of keywords is up, the next step, which requires more planning, is their insertion into the webpage at just the right dosage: having too many leads to keyword stuffing, a definite No-No that can even disbar you from the search engine fraternity; having too few diminishes the impact and severely limiting the prospect of being taken seriously.
Hence, keyword density, a concept borrowed from the measure of the amount of material within a specified volume, in this case, applied in the two-dimensional sense represented by a surface area. Recommended densities in this respect can vary from 5% to 20%, depending on the length of the page. Obviously a longer page with a higher percentage of keywords sprinkled throughout may still be readable compared to a shorter page but strewn with the same percentage of keywords.
Then there are placement locations to consider. Michael Miller recommends at least once in the preamble/introduction and another time in the concluding paragraph. Another way is to partition the page into sections with headings, which are then legitimately colonized by the keywords.
Whatever the techniques, ultimately, it's still the human reader who will be the arbiter of whether the page is a forced concoction arranged to suit the keywords or it is a enjoyable read, regardless of whether it is ranked high or not.
That said, one can also argue that if the page is not ranked high in the first place, chances are it would not be read. Therefore, in addition to appealing to the human eye, the page also needs to be searchbot-friendly, in a way pandering to their set ways of sniffing. And this is most efficiently, and effectively as well, done through optimizing the HTML tags, the subject of Chapter 6 of Michael Miller's book.
That prospect led me down the memory lane, going back to the mid-1990s when I took some introductory courses in HTML codes, and even experimented with my own off-line personal journal, complete with photos interspersed between the HTML tags. It will be a long overdue refresher course of sort.