What are examples of books which teach the practice of mathematics? One may classify the types of mathematics books written for students into two groups: books which merely teach mathematics (i.e., they present theorems and proofs, ready-made, as it were) and those books which teach one the art of mathematics (i.e., they do not merely teach one mathematical results, but also how to do mathematics). Obviously books of the latter type are harder to write and, consequently, are rare. However, I've been reading W. W. Sawyer recently and have thoroughly enjoyed his writing (even those parts that covered material I'd known before -- known albeit in the sense of 'type one' books).
Naturally, one seeks to find out other books of the sort. Therefore, if you know books that fall in the latter category, please recommend them. To be clear, this book should not merely present theorems and perhaps require the reader to supply some dry, routine proof like induction, or some such thing; but it should lead the reader, as it were, into doing mathematics; that is, the book should explain why results are needed (in other words, provide sufficient motivation), how they might have been originally discovered (before being polished into an artificial presentation, say) and explain other contextual information of relevance to a particular mathematical result. To be further clear, I have read Polya and Euler, for example, and they both seem to fall in this category too. There should definitely be others that I'm missing. Please do recommend them. Many thanks.
 A: A few of my favourites that immediately come to mind:


*

*Janich, Klaus. Topology

*Carter, Nathan. Visual group theory

*Lawvere, F. William and Stephen H. Schanuel. Conceptual mathematics: a first introduction to categories

*Aigner, Martin; Ziegler, Günter. Proofs from THE BOOK
Also, in their own weird way:


*

*Steen, Lynn Arthur and Seebach, J. Arthur. Counterexamples in topology

*Nelsen, Roger B. Proofs without words: Exercises in visual thinking (series)
A: *

*How to prove it, by Daniel Velleman. 

*Einführung in das mathematische Arbeiten, by  Hermann Schichl and Roland Steinbauer.  (In German)
Both are on a very elementary level. 
A: Although it sits at the interface between maths and physics, Gauge Fields, Knots & Gravity by Baez and Munian can be in the list. It finally made Differential geometry click for me as it provided much of the physical and mathematical motivation behind the concepts.
A: This is not so much "how to do mathematics" (to quote the OP),
but more how it feels to do mathematics.
A New Yorker review said this book "is less about math than about mathematicians—how they live, how they work, and how they talk to one another." I found it inspiring.

Villani, Cédric. Birth of a Theorem: A Mathematical Adventure. Farrar, Straus and Giroux, 2015.
  (Guardian review.
  AMS review.)
  
           
  


The AMS review ends: "The implicit task that Villani had set for himself, of explaining what it is all about, is a difficult one .... To my mind the book succeeds wonderfully."
A: It not clear to me what kind of book your looking for, or at what level.  Or perhaps it would be better to say I don't believe that you have a dichotomous classification into books that only teach mathematical content versus how to do mathematics.
At a very elementary level, one book which hasn't been mentioned yet is


*

*How to think like a mathematician, by Kevin Houston


that I've sometimes used as a supplementary book in an intro to proofs course.
Then after one progresses to a more advanced level, I think one learns the art of mathematics not so much by explicit meta-construction, but by seeing it and figuring it out oneself.  That said, there are some books which help with this more than others, and here are a few more specialized ones that I think are good:


*

*Course in arithmetic (or anything) by JP Serre (he's very concise and on the surface you might place this in your first category, the presentation and choice of material is excellent, and I think the process of reading Serre and figuring out the details helps one's mathematical maturity greatly)

*Problems in Algebraic Number Theory by Murty and Esmonde, or similar books in this vein (there are some basic definitions, and then a load of exercises (with hints and solutions at the end) for you to develop the theory on your own, a quasi-Moore method sort of thing)

*Foundations of Algebraic Geometry notes by Ravi Vakil (he has lots of meta-mathematical notes on why you do things a certain way, that I think help mature one's mathematical philosophy)
A: How about:
Daniel Solow, How to Read and Do Proofs
A: On my opinion, the prime examples are the books of Polya:


*

*Polya and Szego, Problems and theorems in analysis (level: graduate+).

*Polya, Mathematics and plausible reasoning (all levels)

*Polya, Mathematical discovery (high school to undergraduate)

*Polya, How to solve it (high school).
A: This may not be what you are looking for but I really enjoyed the Probability Lifesaver by Steven J. Miller. It is very thorough, emphasizes the importance of proofs and leads the reader through those proofs, fairly rigorous while leaving out some of the finer details, and helps to think through non-intuitive problems in probability theory. The style is also very accessible and readable.
The emphasis on proofs was especially appreciated. I am often tempted to skip proofs since I use probability theory for application and am not a mathematician. A lot of the proofs in this book are described in a style that tries to justify why one would try a particular strategy at each step. The author leads the reader through the proof and tries different approaches, even ones that lead to failure, for the purpose of instruction. This was extremely useful. 
I enjoyed this book because it gave me the confidence and appreciation of math that has made me more comfortable in reading more advanced and rigorous texts.
A: When I was in college, I read “The Psychology of Invention in the Mathematical Field” by Hadamard, and I found it impressive. My first reaction today is to say that the book nonetheless did not teach me to do mathematics. On further consideration, I think that maybe it taught me the value of down time: leaving the problem in the back of my mind while I did entirely different things; and the value of sleep.
A: Two books by David Bressoud:


*

*Bressoud, David M. Proofs and Confirmations. The story of the alternating sign matrix conjecture. MAA Spectrum. 1999



"My intention in this book is not just to describe this discovery of new mathematics, but to guide you into this land and to lead you up some of the recently scaled peaks. This is not an exhaustive account of all the marvels that have been uncovered, but rather a selected tour that will, I hope, encourage you to return and pursue your own explorations.'' 

There are conjectures; partial progress on the conjectures leads to new conjectures... students could learn something about the practice of mathematics by reading this book.


*Bressoud, David M. A radical approach to real analysis. Classroom Resource Materials Series, 2. MAA. 1994.


From Math Reviews:

This book "starts with infinite series, illustrating the great successes that led the early pioneers onward, as well as the obstacles that stymied even such luminaries as Euler and Lagrange''. Mistakes that were made are emphasized to highlight difficult concepts, and the student is led through some of the evolution of such concepts as uniform convergence as they arose in response to a need.

A: Numbers and Functions by Victor H. Moll and The Concrete Tetrahedron by Manuel Kauers and Peter Paule on an elementary level and Advanced Determinant Calculus (Séminaire Lotharingien Combin. 42 (1999) by Christian Krattenthaler on an advanced level. 
A: I may be not the only one, but I learned all my practice of working mathematician within the treatise of N. Bourbaki (Theory of sets, Algebra, General topology, Functions of a real variable, Topological vector spaces, Integration, Lie groups and Lie algebras, Commutative algebra, Spectral theories). The front address "To the reader" helped me to use theory, exercises, counter-examples, bibliography. It is a very clear guide (remains to work).  
A: Probably at more elementary level than you intend, but otherwise (I think) remarkably on target,


*

*Burn, R. P., Numbers and functions: steps into analysis., Cambridge: Cambridge Univ. Press. xix, 328 p. (1993). ZBL0872.00009.


(I wish I remembered where I recently saw it recommended. This related question mentions it along with others by the same author.)
A: I enjoyed Imre Lakatos (1976), Proofs and Refutations (Cambridge University Press ISBN 0-521-29038-4). It's very 'philosophical' - written like a Socratic dialogue - so even if the geometry discussed is relatively easy to grasp, it may not suit all readers. His ideas about 'monsters' in mathematics have stuck with me for years.
A: If German is an option as well, a rather new book on the market, supplied with more than 1000 youtube videos:
Konkrete Mathematik nicht nur für Informatiker
