Keyword density, also known as keyword frequency, is a ratio between the number of keywords and overall word count, how often keywords come up on the page.
Back in the times when keyword stuffing was popular, the higher the frequency was, the higher you would rank. Search engines have developed since then and became more sophisticated: it is not enough to just put many keywords on the page to appear at the top. Quite on the contrary, the bigger the density percentage is, the more likely you are to be pushed to the back of SERPs.
If the keyword density is too high, search engines are likely to see it as spammy and low-quality. High keywords percentage means worse user experience as well since such content is often unreadable or at least annoying because of repetition.
There is no perfect keyword density. The main rule is to create high-quality content that is unique, well-written, and delivers new information. Keywords should be brought in the text naturally and use variations from time to time.