J.K. Rowling studied Classics alongside French at the University of Exeter.
Her undergraduate course combined French and Classics, and she graduated in 1987. Classical mythology and ancient literature are frequently discussed in connection with the Harry Potter books because the series includes names, creatures, spells, and ideas with roots in Greek and Roman traditions.
A common mistake is to assume Rowling studied English Literature because she became a novelist. Her degree was not English Literature. Her academic background in French and Classics instead gave her experience with languages, translation, and older literary traditions.
The books do not depend on readers knowing classical mythology, however. Rowling generally uses such references as part of a broader mixture that also includes folklore, medieval legends, modern school stories, and invented material. Her Classics studies are therefore an influence often noted by readers, not a requirement for understanding the novels.