How do authors make their problems/exercises for their math books? I want to be a math professor one day, but I'm wondering how to make my own original problems to give them to my students. I think that it is a responsibility of the professor to create original and useful problems for their students given that there is a lot of solutions online of classic books.
How do they do it?
 A: Interesting question...
It depends on your level. 
At high math level, clearly it is difficult to "invent" original problems, as all the problems you can propose are clearly problems that have been almost fondamental problem that the math community had to tackle in the past (however easy it may seem now). In that case sometimes it is better to keep with the "classical" problems instead of creating new versions of them. 
At lower levels, I would suggest three things:


*

*Start from the answer. It is the easier way to give problems that are going to be easy to check up, that would favor reasoning over over calculus etc. That way it is possible to create "original" problems, for you just have to choose "original" or "different" final results.

*Start from the answer: if the final result is something that resonates for the student, that is solving something in the "real world", or in the "math world" (intermediary lemma for instance), you will have a problem that is "useful" in the eyes of your student (not that any math won't be useful in the long run). 

*Transform existing problems (best method to create variations of problems for which it is useful to know the technics very well and for which repetition is very useful). Usually not original nor "useful" as first sight
I was not a math teacher for long, and I only did some math courses to students preparing for advanced math studies, but these were my preferred methods. 
A: First of all, I don't find it to be a troublesome to assign "classic" exercises for which solutions can be found online.  There are lots of such problems I personally like that I think students can get a lot out of.  People who want someone else to solve a problem for them can always ask here for instance.
That said, I generally find that when I prepare my lectures, ideas for exercises come to me naturally.  Normally I first prepare without any references (or just check the book for the topic if I'm following a text) and think through the material from first principles, and during this process I to ask myself the sort of questions I would if I were learning this for the first time--both in terms of what are the main points of the theory and what good is it for.  Of course one simple source of problems is just to ask students to work out various examples or parts of proofs I don't have time/desire to do in class, but usually an ample number of related problems occur to in this preparation process.
Note for some courses (calculus, linear algebra), it's logistically simpler to assign most computational problems from the book, as many texts have good exercises and you often need to work though an example in advance to make sure it illustrates exactly what you want and doesn't turn into a computational nightmare.  When I do want to come up with my own computational problems on my own, I'll often think about what I want it to involve, and then work backwards to get a suitable example (e.g., a diagonalizable matrix with nice eigenvalues).
A: Here is the thing, Whenever you answer a question, You usually end up asking yourself even more questions on your way of getting the solution. And sometimes those questions are way more interesting and sometimes they can even be harder the original question itself. 
Here is an example.
(Original Question)
Find a pair of integers $(x,y)$ such that $$2x = 10y$$
Clearly, $(5,1)$ is a one solution.
However, When attempting to solve the question, the following question may have crossed your mind (you may want to generalize it)
(Derived question) Find all pairs of integers $(x,y)$ such that $$2x = 10y$$.
That's definitely a more interesting and  a harder question, and even more harder if you wondered are there finite or infinitely many such pairs ?
You see where am I going ?
The idea is , You don't need to invent a new question. Most of the time, you can get (Derive) a lot of questions from just one question.
A: I personally am a (Euclidean) geometry enthusiast. To write problems, I pretty much go onto some geometry software like Geogebra or Geometers Sketchpad (I use the first because its free from their website) and I fool around, try to find some cool things. Once I notice something interesting, I investigate. Are these four points concyclic? Are these three points colinear? Are these angles the same? Etc. I fool around to determine if they could be true, and if they could then I think about I would go about proving this finding rigorously. I also use my previous knowledge, both in how to prove a statement (thus completing the problem so it's able to be given to others), but more importantly on what to fool around with. For example, yesterday I remembered this problem that I had read a while ago: 

Let ABCD be a trapezoid with AB || CD, let points X and Y be on AB and CD such that XA/XB = YD/YC. There are points P and Q on line XY such that < DPC = < DAB and < AQB = < ADC. Prove that A, P, Q, and D lie on a circle. 

Then I fooled around a bit, drew the diagram, and added points and lines semirandomly. I ended up with this problem (continuing the notations of the previous question), and I ended up finding a nice solution: 

Let PD and AQ intersect at M, and let PC and BQ intersect at N. Prove that MN is parallel to CD. 

Now you have a brand new problem that builds on a previous problem! 
A: Despite the description specifying this is in a more matured classroom than most people I've taught, the question and tags are more general, so I decided it would be best to include this answer for people who hope for a solution that's less specific.
Advanced mathematics is inherently harder than simpler mathematics to create problems with, but this is how I create questions


In this example, I want to teach year 7 students algebra in a way that makes it look as simple as a preschool problem.

The first step is to determine a theme: in this case, simple objects in a preschool setting
Then, I must think of how algebra relates to simple objects. When substituting, you look at the total amount, a variable, and a way to create a difference between the total amount and variable (actually, I could exclude this, but define x if x=1 is kinda sad for a year 7 class). Maybe the variable and difference can use simple objects.
I must then create a purely mathematical expression or equation, along with a question for solving. 

Find x where x+3=5, 

Finally, I merge the two into a problem. 

A person has 5 simple objects, if she has 3 simple objects of one type, and the rest are of another, how many of the second type of simple objects are there?

Now, we have a problem, and we can apply the theme. We find the things that are common between simple objects and preschool, and use that to change the wording.

A person has 5 fruits, if 3 are apples and the rest are oranges, how many oranges are there?

Add a few finishing touches, generally details to make the question more interesting and to confuse the students who have been too lazy to read it carefully.

Sally has 5 fruits in a basket, if 3 are apples and the rest are oranges, how many oranges are in the basket?

If you get a student who says "There's one basket, Mr!", you know who needs to brush up on their reading skills. I've had peers who read questions incorrectly a while back, and the results are hilarious, so I deliberately add these extra details.

It may sound simple to most when I say it, but I've seen people get stumped on creating simple things like this until I lead them through it. It's important to note my example was deliberately easy, it's extremely helpful to consciously think through this process with math past year 10 education.
Sorry in advance if the formatting is terrible, the iPad stack exchange app doesn't seem to have special mathematics formatting tools.
A: To set the scene for my answer: since 2010 every year I have worked with and taught classes of "very-soon-to-be" students in a so called "Vorkurs Mathematik". This is a 4-week course at the very beginning of your first semester at university, so usually the students have just finished school ("Gymnasium" in Germany which I think would be high school in America?). In this course we quickly review everything they should have learned so far in school and then give some hints of what mathematics is really about (propositional calculus, basic set theory, basic linear algebra...) which usually isn't taught in school anymore. In addition in these past years I have worked with students of different fields (Mathematics, Physics, Engineering, Biology) who are already studying at university. For me three things are important (depending on the level you are teaching of course as @Martigan has pointed out):


*

*Although there are lots of classic problems including solutions to be found on the internet, it is important to cover these (in detail) in your own class. For example:

Prove that $\lim\limits_{n\to\infty} \frac 1n=0$.
Proof: Given $\varepsilon >0$ choose $N\geq \frac{1}{\varepsilon}$. If $n>N$ then $$|\frac 1n-0|=|\frac 1n|=\frac 1n < \frac 1N<\varepsilon.$$ 

This is a perfectly good answer one could find in any textbook and to you and me this is "the way" to do it. But for a student just starting to deal with problem like this, this solution has a major flaw as it does not point out your train of thought. Yes, $N\geq \frac{1}{\varepsilon}$ is a perfectly good choice as it obviously "works". And to you and me it should be obvious that one could have chosen $N\geq \frac{1}{\varepsilon} +1$ instead. But how did we get to the point of choosing $N$? To a new student this can be one hell of a problem if these basics are not covered, be it in a lecture or in a question which is then explicitly talked about. A nice approach was made by Christopher Wallace in this post.
So in my opinion every professor should cover these classic problems at least on a beginners level. This doesn't mean that one should copy questions and solutions from a textbook, but rather to apply your own style to the solution e.g. solve the question yourself in a way that points out your train of thought. 

*If you only use these classic questions, it can get boring. So in addition to the official questions I had to cover in the seminars, I tried to come up with a fun or interesting or surprising application. One example from the Vorkurs, so aiming at soon-to-be-students:
In german schools it is common to cover the reconstruction of a polynomial to given points. In those questions there are usually $n+1$ points given to reconstruct a polynomial of degree $n$ (sometimes exceptions are made in advanced classes which also covers family of curves). Based on this I often give them the following question, which is not part of the official program of the Vorkurs:

Given a polynomial $f(x)=a_nx^n+a_{n-1}x^{n-1}+\dots a_1x+a_0$ with $a_n\in \mathbb{N}, a_i\in\mathbb{N}_0$ for $i\in\{0,\dots, n-1\}$. You can ask (multiple times) for the value of any $x\in\mathbb{Z}$. Is it possible to reconstruct the polynomial? If yes, what is the minimum quantity of values you have to ask for?

As the degree of this polynomial is unknown, they can't use their "normal way" of asking for $n+1$ values. But this question is solvable using only what they've learned in school and in the Vorkurs so far (you only need to know about representation of numbers to a different base). This is what I would consider an interesting and surprising application, as it takes on a known question but you have to think of a new way to solve it (and in my oppinion the answer is indeed surprising). 

*I find it very important to always be amazed and enthusiastic about your own subject. This might sound trivial as you wouldn't want to become a professor if you don't like the subject, but in teaching it is very important to convey your enthusiasm to your students. As I pointed out, your students have to deal with classic questions. So as their teacher you have to deal with these questions, too. And maybe you have to deal with these for the rest of your life, as the basics of mathematics are unlikely to change. For some it is very hard to keep their amazement for these "trivial questions", which I think leads to bad teaching. So I always try to keep in mind how amazed I was the first time I solved this kind of question and how good it felt to know exactly how I got to the solution.
Of course this doesn't need to hold if your students are more advanced as they should have figured this out themselves by then, and it also varies if you're teaching mathematicians or students which must take a maths course but are not really interested in the subject (in my own experience the biology students where often only focussed on how to pass the exam).
In short: take classic questions and apply your own style to them, thus making it at least part your (original?) question. Give interesting tidbits. And always be enthusiastic even about easy stuff.
A: Plagiarize,
Let no one else's work evade your eyes,
Remember why the good Lord made your eyes,
So don't shade your eyes,
But plagiarize, plagiarize, plagiarize...
A: In my own experience when I am discussing a solution of a classic or a textbook problem in class, the discussion often leads to new offshoot ideas, alternate solutions and newer problems. It is amazing what ideas and new problems come up with a group of students having constructive discussions.
