How does a mathematician choose on which problem to work? Main question:

How does a mathematician choose on which problem to work?

An example approach to framing one's answer:

What is a mathematical problem - big or small - that you solved or are working on, how did you choose this problem, and why did/do you continue to work on it? 

An earlier incarnation of this question asked also for problem sources, and about finding mathematics questions (and engaging in mathematical research) more generally; hopefully this revised version focuses it a bit more (though already posted answers should be understood as responses to the previous version).
As one example of what a retrospective look at a problem (problems) might look like, see the note (How the Upper Bound Conjecture Was Proved) provided by Richard Stanley in a comment below.
 A: I think that this question is somewhat similar to:
"How does a botanist decide which plants to look at?"
Well... a botanist always looks at lots of plants.
In the early phases of his/her career, a botanist will spend a lot a time studying well-known plants. Later on, a botanist will have learned to quickly recognise the commonly occurring plants so as to be able to quickly ignore them. He/she will then be able to focus their energy on rarer plants, or plants whose morphology is particularly interesting.
Even later, a botanist might have the opportunity to participate in expeditions to various remote parts of the planet, in order to search for plants that are new to science.

Now:
"How does a mathematician decide which problems to think about?"
Well... a mathematician thinks about a lot of stuff.
In the early phases of his/her career, a mathematician will spend a lot a time studying well-known constructions. Later on, a mathematician will have learned to recognise those problems that can be treated efficiently with well-known tools from those which are likely to be too hard. With the help of an adviser, he/she will then be able to focus their energy on problems that are at the right level of difficulty. Here, the meaning of "the right level of difficulty" always depends a lot on the expertise and background.
Experienced mathematicians have had the possibility to accumulate, throughout their interactions with colleagues, and by their own personal attempts at solving problems, a little collection of problems that are specialized enough so that no-one has really thought about them yet, and not too difficult for a graduate student. That's how graduate students often get their problems to work on.
The mathematicians who are no-longer graduate students have to constantly try to solve new problems. Their ability to find interesting problems (and to solve them) defines how good they are at their job.
A: I've found that "problem creation by analogy" can be very helpful. In grad school I learned about elliptic curves from many great sources (courses of Mazur and Serre, grad student friends too numerous to enumerate, survey articles by Cassels and by Tate, books by Lang,...) and started working on an elliptic curve problem posed by Lang. And every few weeks I'd go to the library and skim the titles and abstracts of lots of journals. (Nowadays, the ArXiv can serve as a similar source.) And I noticed an article with a new improvement on something called Lehmer's conjecture, which I'd never heard of, but it had something to do with heights of algebraic numbers. So I thought, well, algebraic numbers (more properly, the multiplicative group $\bar{\mathbb Q}^*$) are analogous to points on elliptic curves. So I translated Lehmer's conjecture to elliptic curves and proved a result. (Admittedly, it was rather weak, and Masser and other people had stronger results via different methods; but over the years, I've returned to the problem and have papers with Marc Hindry and with Matt Baker.) Fast-forward a few years, I was at a conference at Union College, where the inimitable John Milnor gave a beautiful colloquium-level talk on complex dynamics. I knew nothing about the subject, but for the first half, which he devoted to a survey of the classical theory (Fatou, Julia, etc.), almost every concept that he mentioned seemed to have an elliptic curve (or arithmetic geometry) analog. Thus orbits of points via iteration of rational maps looked analogous to the Mordell-Weil group of an elliptic curve, points with finite orbits were the torsion points, one could look at integer points in orbits as being analogous to integer points on curves (Siegel's theorem), etc. Pursuing that analogy has lead me, and many other people, to a host of fascinating problems, including 10 PhD theses that my students have written in this relatively new field of arithmetic dynamics.
A: Here is one attempted answer (with the major caveat that I am not a professional mathematician). You actually have several questions, and so I will try to address the one in the title:

How does a mathematician choose on which problem[s] to work?

I emphasized the indefinite article (because different mathematicians, of course, have different approaches: an extreme example would be to compare Grothendieck and Erdos, with an interesting thought at MO 7155 in the third comment; more generally, see Freeman Dyson's Frogs and Birds) and pluralized the word 'problem' (because a mathematician may be working on several different problems, or parts of problems, at a time).
And so maybe I will comment briefly on one mathematician: Paul Cohen, who picked a rather tremendous problem (Hilbert's first problem, the Continuum Hypothesis) in 1962, and proved its independence in 1963. In MO 159935 I tried to hit the main points about how Cohen's thinking [may have] evolved, which benefited from the pair of answers to an earlier question I put up in MO 124011.
The key points, as I understand them, were:


*

*A commanding interest in the problem, and, in taking on a big problem, a previously demonstrated mathematical aptitude (although in a different area, Cohen published On a conjecture of Littlewood and idempotent measures in 1960, which earned him the AMS Bôcher Prize in analysis when it was next given out);

*A social network to support such work (consider, for example, Cohen's support in graduate school, his later interaction with Kleene, and his subsequent communication with Godel);

*From  (1) an eventual new idea (or new ideas); maybe these do not exist at the outset (cf. fedja's response to MO 124201) but something needs to convince you not only to pick up a problem, but also to stick with it - consider Cohen's combination of: thinking model-theoretically (I refer to his familiarity with Skolem's work, but this was not unique to set theorists at the time), thinking with "decision procedures" (I refer to his notion of building a model up slowly in a way that, I think, differed from the work of other set theorists at the time), and his familiarity with the Post Problem and its resolution via the priority method;

*The space/time to think about the problems deeply: if you are worried about getting tenure, or keeping a job, then attacking a major problem -- as Cohen did -- may not be the best approach (consider also that Cohen has an important realization during his off-time, i.e., while driving around near the Grand Canyon; this seems to be a theme in mathematical insights, from Poincare to Hamilton).
I do not want this to grow too long, and I hope working mathematicians do not feel mis-represented by these few observations (and will correct them as necessary!). I think that if you re-summarize the four points above as some sort of themes, then you may find something like:


*

*Interest in the problem (no surprise, I hope); 

*People to support you, work with you, advise you, etc (sometimes this social aspect seems to surprise non-mathematicians -- maybe it is less surprising in the context of this site, MO!);

*New ideas and ways to approach the problem;

*Other environmental resources (e.g., job stability, time to think).
There should be many examples for each theme (e.g., for 1: Pereleman's proof of the Soul Conjecture before the geometrization conjecture) and exceptions (e.g., for 2: Yitang Zhang, it seems) and other parts that were excluded (the interaction of working in different areas, on different problems, with different people) and even contemporary changes (the communication that occurs through MO or polymath projects may affect 1, 2, and 3 for the better; the "publish or perish" mindset of some institutions, or a reduction in funding, may affect 4 for the worse). 
Still: I hope this "attempted answer" is helpful (even if only in a minor way).
A: I think this is a difficult and significant question, and I have appreciated the answers to date.  I am hoping to learn more about this topic from further answers, since I have struggled with this challenge all my career.  I think it is widely felt that great problem finders are more rare than great problem solvers.  Still I am motivated to try to answer it myself although I don’t feel well qualified to do so.  And I hope I may learn something by thinking about it.  I suggest a naive preliminary question:  is one trying to solve the deepest possible problem, or to have as much fun as possible?  Some of us are, to recall David Riesman, “inner directed”, and want to emerge from a private space with a solution of the Riemann hypothesis, and some of us are “other directed”, and just want to show up at a meeting with our advisor with a solution of his/her favorite problem.
Also, there is the question of how should a research problem be ideally chosen, say by a master, versus the question of how should the modestly gifted among us actually proceed, given our limitations.  Thus even if one does hope to enter into research on a significant problem as soon as possible after tools begin to exist for its attack, only a select group of people may realize when this occurs.  
So for this it is beneficial to maintain contact with the words and writings of those leaders who have command of the field one works in.  It also helps if they are conversant with pregnant but little known literature, such as the papers of K. Petri, shown to me in the late 1960’s by my first advisor Alan Mayer, or the book of Wirtinger on Theta functions revealed to me by my second advisor C.H. Clemens. 
After being launched by these generous gifts, an opportunity occurred again during a research postdoctorate at Harvard, privileged to be among the giants: Mumford, Griffiths, Hironaka, Mazur, Kazhdan, Bott, Zariski, a fabulous group of students: Bob Friedman, Joe Harris, Ron Donagi, Dave Morrison, Ziv Ran, Rick Miranda,.... and the many other stars who came there - Igusa, Fay, Teissier, Freitag, Tai, Siu, Ramanan, .....
To take advantage of this opportunity, I moved my family to Cambridge and lived on an  NSF stipend so small I sold my car the first year for food, and had to decline the second year entirely.  So you could say that to pursue excellent current problems from a privileged perspective as a young researcher, I embraced temporary poverty.  The benefit was a seat at the theater to which the most active players in my field came to present their latest work.  At this point it was very stimulating to try to answer any question whose answer was interesting to one of my mentors but unknown to them.
Those comments are from/for someone of average ability trying to compete for early progress on problems that are of wide spread interest and that may bring notoriety.  Fortunately, as much or more satisfaction is found by working on problems that just appeal to our imagination, and that match our own expertise.  At this later stage we are moving away from dependence on experts, to instruct us and supply us with topics and ideas, and are beginning to follow our own interests.
So here one begins to acquire some expertise oneself, from study and independent work. It then begins to be ones own responsibility to maintain up to date awareness of the progress of others and to try to apply it to questions that appear of interest.  It seems crucial here to attend talks by the best workers and to read their works.  At this point one reaches the mystical stage of being able to predict what the answer to a question will likely be, before one has solved it.  One may even attempt to compete with recognized experts on the same problems.  Success however will depend on more than  good intuition, but also on mastery of technical tools to complete the work.
Some very strong individuals work more privately and still attack more public problems.  I recall William Fulton saying he wanted to try to understand Schubert’s work on enumerative geometry, so he started reading it and filling details, but I don’t recall how much the fact it was a Hilbert problem influenced him, if at all.  My colleague Bob Rumely was attracted to a Hilbert problem on finding procedures for solving integer equations, and tweaked it brilliantly to arithmetic integers.  So another problem - finding technique is to take a well known one, solved or unsolved, and modify it intelligently.
The third stage it seems to me, is having such a wide awareness of the state and likely development of a field or area, that one sees likely problems on every hand and invites new talent to work on them.  If one succeeds here, one may create a team and an environment of creative research that feeds on itself, and all the players may learn to add to the palette of interesting problems.
By the way, I would very much like to read accounts from some of the participants here of how they found a few of their favorite research problems.  Going out on a limb here, I suspect a strong element of randomness will be noted.
A: In accordance with Roy's prediction, my mathematical history exhibits much randomness. Here are 4 topics I've spent time on. The initial catalysts varied--a talk to high-school seniors on the congruent number problem, a question posed in the Monthly by an old friend, a thesis defense, and an MO question, but after the start the mathematics controlled how things developed.
I was familiar with some of Fermat's descent arguments, and volunteered to give a talk to prospective Brandeis students as to why certain numbers weren't the areas of right triangles with rational sides. This led me to look at Birch's exposition of Heegner's sketchy argument that primes that are 5 or 7 mod 8 are congruent numbers. I was able to generalize this a bit in an article on "mock Heegner points". Biquadratic twists seemed yet more interesting--I found some conjectures of Mordell on the ranks of elliptic curves with j=1728, and was able to give some proofs.
Fred Richman, whom I'd known from grad school days, asked in the Monthly--"Can a square be dissected into an odd number of non-overlapping triangles, all of the same area?" A partial answer using Sperner's lemma intrigued me, and I realized that by using a 2-adic valuation on the field generated over Q by the co-ordinates of the vertices of the triangles, I could give a complete proof of the impossibility. I continued work on equidissections, along with Charles Jepsen, and had one particularly nice result, a confirmation of Sherman Stein's conjecture that the square could be replaced by any centrally symmetric set. A new ingredient in this proof was a little group cohomology.
Al Cuoco's thesis defense involved purely algebraic aspects of the Iwasawa theory of multiple Z_p extensions. Ralph Greenberg asked me to sit on the thesis committee; I found the topic to my taste, and Al and I did some work together. This involved the study of Z_p[[X_1,...,X_n]]-modules. The questions that arose were and remain too hard for me, but I had the idea of reducing mod p, which led to notions that I intended to call the Hilbert-Frobenius function and multiplicity. Until I discovered that I'd been anticipated by Ernst Kunz (but he missed out on the multiplicity because of a miscalculation). With my students Chungsim Han and Pedro Teixeira I continued to explore the now christened "Hilbert-Kunz multiplicity" for a long time. I was happy that one could use the computer to make predictions and that ad hoc methods sometimes gave proofs. Connections to more mainstream parts of commutative algebra were discovered by others. Later, Holger Brenner contacted me, suggesting that his ideas and Hilbert-Kunz techniques might solve a vexing problem about tight closure. Indeed early calculations that I'd made played a key role in our counterexample.
Kevin O'Bryant proposed several questions about elements of Z/2[[x]] on this site, asking for the asymptotic density of the 1's in the sequence of coefficients of certain of these power series. Being a big fan of "Diquisitiones" I saw that the Gauss theory of ternary quadratic forms was relevant, and gave partial answers. Some similar questions seemed more recalcitrant, but David Rohrlich suggested that a result of Serre's on mod p modular forms could sometimes be used to show that the density was zero. This led to my getting interested in mod p modular forms, and by a circuitous route (steps along the way were the study of the polynomial relations between certain characteristic 2 theta series, and the study of the modular equation in finite characteristic) to some of my current preoccupations. Once again the sheer complexity of what's going on, and the possibility of using the computer to understand what ought to be true are a strong attraction.
A: It may be productive to contrast the methods of work of mathematicians to those of scientists. The following is, I think, a nice summary of how scientific effort is organized:

“Polyani thought science reached into the unknown along a series of what he called ‘growing points,’ each point the place where the most productive discoveries were being made. Alerted by their network of scientific publications and professional friendships---by the complete openness of their communication, an absolute and vital freedom of speech---scientists rushed to work at just those points where their particular talents would bring them the maximal emotional and intellectual return on their investment of effort and thought.” -p.34 of The Making of the Atomic Bomb by Richard Rhodes

Many mathematicians would take issue with the word "rushed" used above. Because of the substantial investment of time and energy needed to internalize new mathematical concepts, such "rushing" is not as common in mathematics:

“in general mathematicians tend to behave like 'fermions'
  i.e.  avoid working in areas which are too trendy
  whereas physicists behave a lot more like 'bosons'
  which coalesce in large packs and are often overselling their doings, an attitude which mathematicians despise.”--Advice to the Beginner Alain Connes

Despite the contrast seen between these two quotes, it is important for mathematicians to choose problems at "growth points" in their research areas. These are places where problems are "ripe", i.e. there is evidence that techniques are ready to shed meaningful light on problems whose solution would move many interesting problems forward. This said, as the second quote indicates, mathematicians are not as likely to crowd around a growth point and all attack it directly as they are to look for byways near a growth point that need development. This may be changing (think Polymath project), but I don't think we are likely to become like physicists so soon. 
A: Early in my mathematical life, my selection process was largely passive, in the sense that more experienced mathematicians would put problems in front of me, and the only decision I made was whether or not to work on them.  My first published paper was born on USENET.  Chris Long posed some question about Fibonacci numbers that I think he had discovered empirically.  I solved it and it turned out to be interesting enough to be published in the Fibonacci Quarterly.  Obviously, there was a large amount of randomness involved here.  I did not already know Chris Long, and I was not even intentionally looking for a problem to solve and publish, so for me to stumble across his problem and solve it was quite serendipitous.
Soon afterwards I participated in Joe Gallian's REU.  There again, Gallian presented me with problems to try to solve.  At least in this case, the arrangement was formal—I was there to try to publish a paper, and he was there to try to find a problem that I could solve.  However, I was still largely passively receiving problems rather than actively seeking them out.  This pattern continued through my Ph.D. degree; my advisor suggested various problems and I eventually obtained enough results for a thesis.
At some point, the dynamic began to change somewhat.  The first reason was that in the process of getting my degrees, I was learning more and more math, and developing a sense of what questions were important and what questions were tractable.  Thus I was developing the ability to ask my own questions, instead of having to rely on an external source to feed them to me.  The second reason was that I was getting exposed to more and more open problems, just by listening to talks and reading books and papers.  Gian-Carlo Rota has said that the trick to becoming a genius is to keep a short list of difficult open problems in your pocket at all times, and every time you learn a new mathematical technique, to try it on every problem in your list.  If you ever get a hit, people will say, "How did he ever think to use that technique on that problem?  He's a genius!"  Over the years, a few problems have attached themselves to me like a burr, usually because I found them fascinating and thought I might be able to solve them but couldn't.  I have several papers of this type, where I finally managed to make progress on a question that had been nagging at me for years.
I think that the type of progression I have just described is fairly typical.  Initially, most people have to be told what to work on.  As you learn more, you are able to generate new questions on your own, and you accumulate other people's open problems that you find attractive.
As a final comment, I would say that there can be external factors that dictate to some extent what you work on.  When I was a postdoc in academia, I felt pressure to publish lots of papers, so I tended to stick to topics that I knew a lot about.  To publish a paper, one needs to find that elusive boundary between the trivially easy and impossibly hard, and if one ventures into unfamiliar territory, that boundary can be very difficult to locate.  I think that this effect is stronger than many people are willing to admit.  A lot of people choose to work on a problem simply because it's in familiar territory and they are pretty sure that they can make progress on it.  I personally am fortunate enough to be in a position where this kind of pressure is low and I have considerable freedom to try new areas of interest even if it will take some time before I can make progress.  So I am guided more by what I find interesting than by what I feel I "have to" work on in order to keep publishing.
A: Research works different ways for different mathematicians.  My experience suggests that mathematicians collect or invent problems frequently.  Sometimes the collection/invention happens in an organized fashion, as when the researcher has made a previous commitment (say by a grant request) to work in a certain area.  In this case, certain amounts of time pursuing solutions among traditional venues are pursued (cf. phdcomics.com for various comical takes on this), which include reading and understanding previous work, and designing an experiment to test a conjecture, and modifying one's understanding based on the outcome.
In mathematics and other disciplines in which little or no physical equipment are required, it is also possible to do the collection/invention in a less organized fashion, reminiscent of free association.  Often such is guided, inspired, or stimulated by a seemingly unrelated event, and the result is an insight, idea, process, method, or line of investigation which is pursued and then written up, hopefully for others to use.
To answer your questions in reverse order briefly:
Is there a list of open problems and a mathematician has to choose some of these and then try to solve them? Sometimes.  Usually one forms an area of interest, studies that area, and then either tries problems from the literature, or creates a problem that is suggested by the study.
Where does he get the problem from? He or she gets them from someone else (by reading stuff or talking with others), or from within by comtemplation.
How does a mathematician choose on which problem to work? Usually it is governed by self-interest or interest of a mentor.  Sometimes it comes from pursuing a certain line of research.
How does mathematical research work? Seems to work just fine, thank you. If you want a more serious answer, ask a more considered question.  In particular, read some of the writings of mathematicians, Dieudonne, Hadamard, Hardy, and Kac to name a few.
Gerhard "Use Humor For Serious Understanding" Paseman, 2015.10.11
A: For what it's worth, there are lists of open problems, there are even whole books of open problems (e.g., Richard Guy's book, Unsolved Problems In Number Theory, currently in its third edition). I do not doubt that there are mathematicians who have gone through these lists and found things to work on that led to research publications. But no mathematician is obliged to operate this way, and I imagine that most find their problems by other methods. 
