The K in J.K. Rowling's author name represents Kathleen, her grandmother's name.
Rowling was born Joanne Rowling in 1965. Before publication, Bloomsbury asked her to use two initials because publishers thought young boys might be less likely to choose a book written by a woman. She had no middle name at birth, so she selected Kathleen for the second initial.
The author is generally known as J.K. Rowling, although she has also published fiction under the name Robert Galbraith. Her birth name is Joanne Rowling, and the “K” was added specifically for her publishing identity.
This detail is sometimes confused with “Katherine,” a common spelling variant of the name, but the middle initial officially stands for Kathleen.