Mathematical problems which prompts the creation of new theories We spend a lot of time learning different theories (for instance, theory of differential forms, sobolev spaces, homology groups, distributions). Although (at least most parts of) these theories are very natural and understandable when we read them from books, they are very difficult to create at the first place: it could take tens of years of effort of a large number of excellent mathematicians.
After learning those theories, we do exercises or solve problems, but most of the time, we are just using the tools stated in the book. Even the chance that we come up with a "new" definition ourselves is rare. (By "new", I mean "have not learnt", even if someone else have created it before.) So here is my question:
What are some problems which prompts the creation of a new theory?
EDIT: Just to clarify, I am looking for some problems which give everybody a chance to experience the process of creating new mathematics; so the problem need not be as difficult as Riemann conjecture.
By "new theory", I just mean something that help us formulate the problem in a different way. For example, this video on a chess board puzzle has the idea of creating new theories, because unlike other less interesting puzzles about chess board which can be solved by just carefully counting the squares, this video mentions a new way of looking at the problem, namely the vertices of a hypercube.
I have also seen other similar puzzles like this. Apparently, almost all of them are on discrete mathematics, so it would be really interesting if anyone could provide such a "theory creating" problem in other areas of mathematics (e.g. analysis).
Of course, not all theories are created to tackle specific problems, so other ways of experiencing inventing new maths could also be suggested.
 A: Fermat's last theorem is certainly an example of a problem that can be stated simply but led to magnificent efforts over hundreds of years and the development of much machinery before it was finally resolved. Wikipedia says

The unsolved problem stimulated the development of algebraic number theory in the 19th century and the proof of the modularity theorem in the 20th century.

More generally, I believe you are referring to "acorns" from the following quote of Erdős:

A well chosen problem can isolate an essential difficulty in a particular area, serving as a benchmark against which progress in this area can be measured. An innocent looking problem often gives no hint as to its true nature. It might be like a 'marshmallow,' serving as a tasty tidbit supplying a few moments of fleeting enjoyment. Or it might be like an 'acorn,' requiring deep and subtle new insights from which a mighty oak can develop...

It says at this link

Throughout his career, work on his proposed problems in a variety of areas of mathematics consistently led to advances and discoveries. Much of Erdős' legacy stems from his ability to capture the essence of a deep mathematical issue in a seemingly simple problem.

So I'm sure that if you look up the problems posed by Erdős throughout his life, you'll find plenty of acorns.
EDIT: I just read more about Erdős in the essay, The Two Cultures of Mathematics, by Timothy Gowers:

many people who have solved an Erdős problem... will testify that, as they thought harder and harder about it, they have been led in unexpectedly fruitful directions and come to realize that the problem was more than the amusing curiosity that it might at first have seemed.

A: Well, here is my h'penny's worth :
In trying and eventually succeeding in proving Fermat's last Theorem, Andrew Wiles developed vast swaths of new mathematics. (As had others before him even without managing a proof). The problems are all around; The Riemann Hypothesis - with the tantalising "video's" of the zeros in the complex plane - and other "millennium problems" for example. The worthwhile problems tend to not be easy though !
The Millenium Prize problems : https://en.wikipedia.org/wiki/Millennium_Prize_Problems
The Riemnann Hypothesis :
https://en.wikipedia.org/wiki/Riemann_hypothesis
Andrew Wiles :
https://en.wikipedia.org/wiki/Andrew_Wiles
Kummer Theory :
https://en.wikipedia.org/wiki/Kummer_theory
(Thanks for the lead to Kummer Theory, Hagen von Eitzen !)
