The K in J.K. Rowling stands for Kathleen, her grandmother’s name.
Rowling was born Joanne Rowling, without a middle name. Her publishers wanted her name to appeal to a broad readership, particularly boys who might be less likely to choose a book by a female author. She therefore adopted the name J.K. Rowling before the publication of Harry Potter and the Philosopher’s Stone.
The initial K was chosen in honour of her paternal grandmother, Kathleen. Rowling has explained that she was not actually given a middle name at birth, so the published name was a constructed author name rather than her full birth name.
A common mix-up is calling her “Joanne Kathleen Rowling” as if that were her original legal name. “Joanne” is her first name, while “Kathleen” was added for the author identity. She later used the pseudonym Robert Galbraith for her crime novels.