The way users use search engine is by entering keywords that are associated with whatever stuff they are looking for. Keyword research, hence, is research done to find out what popular keywords used by users, along with users' intent.

Thus, keyword research is very important for SEO optimization as website owners need to know exactly which keywords are often used by users. Moreover, because everyone's way of thinking is different - keyword used by person A to search for product Z might be different from keyword used by person B and C - thus, keyword research needs to be done. Afterwards, that keyword can be integrated into the website's content (on-page optimization).

Now, the question is, how does competition analysis related to keyword research? Competition analysis is done so that website owner knows which keywords have lower competition level (to reduce competition). Utilizing these low competition keywords will help a new website to climb up and even stay on the first page. This competition analysis is needed especially for newer sites that don't have enough foundation for SEO.