Keyword Density is the number of time or percentage that a phrase of keyword appears on a website page verse the total numbers on that same page. Search Engines often use this method of ranking websites.
After 1995 search engines started to use keyword density as a important factor in page ranking in the list results of the search topic. Before keyword density was used big companies like Google and Bing used index of links to pages.
Despite what most people say in 2018 about getting a page to the number one spot on Google it depends on more than just keyword density. The other factor that play a big part are how natural the text sounds, how often people click on the link and relevant it is to the topic at hand. In short keyword density is not as important as people think it is.