Obviously, this would depend on how prevalent magic was in the world. It would also depend on not only how prevalent magic itself was, but how prevalent are people who are able to perform it. There is definitely a distinction, as you could have a world where anyone and everyone is capable of wielding magic, but it is only present in rare locations, or at certain times, or whatever it is you decide.
If you had a world then, of a roughly medieval setting (say 13th-15th century maybe), and suddenly someone discovers they can cast a spell. Likely this would happen somewhat by accident, the same way that likely people first discovered how to actually start a fire. I imagine this would happen in multiple locations around the world, probably with very different results. For example, one person might accidentally cast a spell that cursed someone, while somewhere else in the world someone might cast a spell that caused their crops to grow twice as fast. These two people's views would likely be vastly different in regards to this newly discovered magic, as would the views of the people around them who might have witnessed it, or be aware of it.
Given all of this, how long do you think it might take before magic developed to some sort of form approximating what most fantasy settings have (e.g. a wizard who can shoot flames at someone or something similar)? What milestones in the development of magic might happen, or need to happen, for this level of magical development to be reached?
I'm thinking scientific methods, what was known of them at the time, would be applied to study magic. Would it reach a level familiar in most fantasy settings while the world was still in its medieval period? If not, how long before that would magic have likely needed to be discovered to reach that point?
I'm building a world where magic is still somewhat unknown, people are still figuring out. The setting, time-wise, is a medieval one, so I'm trying to figure out how long before this might magic have needed to have been discovered. Also, how rapidly it might develop further, as that and the previous question significantly impact any discussion of magical origins and workings within the game. For instance, I can't say magic was discovered only 5 years ago, if it is likely that the best most of the world could manage in that time frame is the magical equivalent of mixing two fluids to cause them to change color.
I'm sure people will want to know ore info about the magic system, but rather than include more of a wall of text than I already have, I'd rather include that info if/as it is requested.