You actually have a built in answer in your question.
"...she wrote that she is seeking out her patron so that it can help her fly over some ancient city walls."
When you couple that with:
"I explained to the player that fly is already a warlock spell that she will have access to at higher levels..."
Now, you want to know how to do that in game? Take on the role of her patron so that her patron explains to her that she WILL be able to fly over the walls as she desires, it will just require some more power. This is an excellent RP scenario for you to engage in with your player. As for hunter's mark, when your player starts talking about ways to single out foes and weaken them, the Patron should be bringing up the Warlock version of Hunter's Mark, which is called Hex.
As for the other classes, it's really up to them. Here's my personal breakdown, logically, of how they know about what spells they have access to:
- Wizards - Through meticulous study of books and practical exercise.
- Arcane Tricksters - Same as wizards (PHB covers this under the class)
- Eldritch Knights - Same as wizards (PHB covers this under the class)
- Bards - Through the colleges they attend. Their knowledge of magic can be either refined, or broad, based on their college of study.
- Sorcerers - Since their power originates within them, I personally feel that they can sense the magics available to be tapped in the weave because they have a primal connection to it.
- Warlocks - Their knowledge comes from their other-worldy patron. The warlock class has some access to casting, but more access to Invocations which act more akin to spell like abilities. They learn about their power from their actual source and have struck some kind of bargain to tap into it.
- Divine Casters - This is Paladins, Rangers, Druids and Clerics. They pray to their gods. As they increase in power and knowledge of the world (level up), their gods grant them further insight into the Divine domains.
The Way of the Four Elements Monks aren't on the list above because they aren't actually spell casters. They have Discipline of the Elements instead, which functions very differently from spell casting in that it uses Ki points rather than spell slots. In addition, you select from a list of disciplines, not from a spell list.
But remember, that's my personal take on the source of magical power and knowledge that's only kind of backed up by the books in the sense of the Weave and the Divine. What's really great about the D&D multiverse is that you don't need to subscribe to the concept of the Weave and the Divine at all. You can play a game in our world, where magic is granted by the Egyptian Pantheon. Or you can play in a Final Fantasy setting where magic comes from sources like materia. Or you can tap other materials as sources of magic, like dragon souls, energy fonts, sheer willpower, or radiation.
The possibilities are limitless. It's up to you, and your players, to describe how they know about certain things and whether or not that makes sense consistently within your game world.