Kathleen is the middle name in Joanne Kathleen Rowling, the full name behind J.K. Rowling.
Rowling was born Joanne Rowling and did not originally have a middle name. Kathleen was added in honor of her paternal grandmother. When Bloomsbury prepared to publish Harry Potter and the Philosopher’s Stone, Rowling used the initials J.K. rather than writing Joanne Rowling on the cover.
The choice was partly a marketing decision. Her publisher believed that some boys might be less willing to read a fantasy book if they knew it was written by a woman, so two initials were requested. The “J” represents Joanne, while the “K” represents Kathleen.
Rowling has also used Robert Galbraith for her crime novels. That name should not be confused with her legal name or with a fictional character. Similarly, “J.K.” is an author name rather than evidence that Kathleen was always part of her birth name.