Number theory - like geometry, is one of the oldest branches of mathematics. Many mathematicians contributed to its development. The development was in particular driven by the search for a solution of easy-to-formulate problems, but which turned out to be very hard to be solved and often remained unsolved for centuries. This development is continued even nowadays.
Euclid of Alexandria (325 BC - 265 BC) summarized in his Elements the contemporary ancient knowledge of mathematics. It consists of thirteen books, two of which (Book 7 and Book 9) are dedicated to number theory. These two books include many theorems which are still part of the classical number theory taught in schools and in undergraduate courses of number theory.
Diophantus of Alexandria (ca. 200 - ca. 284) also wrote a treatise consisting of thirteen books, the last 7 of which were discovered only in 1973. The books deal with the solution of integer-valued equations, which are named after him as Diophantine equations.
Hypatia of Alexandria (ca. 370 - 415) was a first woman known as a mathematician. Unfortunately, she was killed because she did not want to join Christianity. In the Middle Ages, many scholars were prosecuted and the ancient mathematical contributions were lost.
Fortunately, mathematicians of the Arabic world, in particular Al'Khwarizmi (ca. 780 - ca. 850) or Al-Kindi (ca. 801 - 873), had brought forth these achievements and developed them further. A big achievement of this time is the invention of the positional number system used also in modern mathematics. They also developed many methods of arithmetics, which underlie number theory and algebra.
The Arabic art of reckoning started to influence Europe when the "dark" Middle Ages approached its end. The first important Arabian influence was brought to Europe by Leonardo Fibonacci (1170 - 1250) who wrote in 1202 a book titled Liber abaci, in which he established the Arabian positional decimal number system in Europe and also introduced the first "algorithms", i.e. steps to calculate solutions to specific problems. The modern word "algorithm" originates from the name "al-Khwārizmī" mentioned above. Fibonacci wrote also in 1225 a book titled "Liber quadratorum", in which he dealt with quadratic Diophantine equations.
Pierre de Fermat (1601 - 1665) was a servant of the royal administration in Toulouse (France). He is considered the "father" of modern number theory. He wrote his results in letters addressed to other mathematicians and number theorists of his time:
Carcavi,
Descartes,
de Bessy, and
Mersenne. In one of his letters, discovered 30 years after his death, Fermat postulated to have found a "beautiful" proof for the fact that the equation $x^n+y^n=z^n$ had no integer solutions for $n\ge 3.$ Unfortunately, the letter did not contain the proof and the theorem remained a conjecture. Many mathematicians tried to find a proof of this conjecture and their search helped immensely in the development of the number theory, but also of other mathematical disciplines. A rigorous proof was found only in 1995, which can be considered the greatest achievement in mathematics in the 20th century.
Leonhard Euler (1707 - 1783) was a Swiss mathematician, but he worked in St. Petersburg (Russia) and in Berlin (Germany). Euler was one of the most productive mathematicians of all times. He published 850 mathematical treatises and 20 mathematical books. It is not surprising that Euler's legacy is also very wide. He dealt with number theory, graph theory, curves, series, variation calculus, calculus, geometry, algebra, and on diverse topics of technology, mechanics, optics, and astronomy.
Joseph-Louis Lagrange (1736 - 1813) was another great mathematician and number theorist of his time. He was a successor of Euler in Berlin but he worked also as a professor of geometry in Turin (Italy) as well as in Paris on the École Polytechnique.
Adrien-Marie Legendre (1752 - 1833) was a French mathematician who was a teacher at a military school in France. He worked on the mathematics of ballistics and of the celestial mechanics as well as on the theory of elliptic functions. However, his work Éssai sur la Théorie des Nombres, published in 1798, became a pillar of later number theory.
The theory congruences and modular arithmetic was first developed by Carl Friedrich Gauss (1777 - 1855). Gauss is considered one of the greatest mathematicians of all times. He further developed almost every branch of mathematics, but his favorite branch was the number theory, which he called the "Queen of Mathematics". A milestone in the development of number theory was his book Disquisitiones arithmeticae, published in 1801, which was written by Gauss when he was 18. In the age of 24, he became a professor of astronomy in Göttingen (Germany) and a manager of the local observatory.
Gustav Lejeune Dirichlet (1805 - 1859) was another important French mathematician who was also the successor of Gauss at the Göttingen University. He was the first to systematically introduce analytic methods in the number theory, which surprisingly proved to be very useful in solving problem formulated for whole numbers by means of developed for real, or even complex numbers (i.e. analytical, infinitesimal, calculus) methods.
Two number-theoretic problems, which drove its development immensely (or, better to say, the search for their proofs) are the prime number theorem and the Riemann hypothesis. Both deal with prime numbers, i.e. those positive integers $p$ which are divisible only by $1$ and $p$. The prime number theorem predicts the asymptotic behavior of the number $\pi(n)$ of primes $\le n.$ It was first conjectured by Gauss and Legendre, who looked at the numerical evidence, which suggested that $\pi(n)\sim\frac{n}{\log(n)}.$ A slightly more sophisticated approximation is $$\pi(n)\sim\int_2^n\frac{dx}{\log(x)}.$$ This asymptotic formula was proved independently by Jacques Hadamard (1865 - 1963) and Charles de la Vallée Poussin (1866 - 1962). In their proof, they made use of complex analysis and the Riemann zeta function $\zeta(s)=1^{-s}+2^{-s}+3^{-s}+\ldots$ for a complex number $s.$ This function has so-called "trivial zeros" at all negative even integers. Bernhard Riemann (1826 - 1866) proved that the prime number theorem was equivalent to the assertion that the only "nontrivial" zeros were in the strip of complex numbers with a real part $> 0$ and $< 1.$ He also formulated a conjecture that these nontrivial zeros all lie exactly in the middle of this strip, i.e. have a real part $\frac 12.$ This so-called Riemann hypothesis is one of the still great unsolved mathematical problems and is one of the Clay Mathematics Institute’s Million Dollar Problems. Most mathematicians believe that the Riemann hypothesis is indeed true.
Some other of the many still unsolved number-theoretic problems can be found here. For a long time, number theory was considered a "pure" branch of mathematics, i.e. without any practical applications. However, with the development of computers, computational number theory became the basis of modern cryptography. Number-theoretic methods like RSA (going back to the basics developed by Pierre de Fermat) are used all over the Internet to encrypt data or to provide non-repudiation services, i.e. proofs that the communicating partners and/or computers really are the individual persons and/or systems on the other side of the communication channel, we believe they are.