These notes have been prepared for the Special Research Semester on Financial Markets, which was held in Pisa, from April 29 to July 15, 2002. The general topics of these lectures is the Hamilton-Jacobi-Bellman approach to stochastic control problems, with applications to finance. Some of the topics treated are: the classical standard class of stochastic control problems, the assosiated dynamic programming principle, the HJB equation, the classical Merton portfolio selection problem, the law of iterated logarithm for double stochastic integrals, the theory of viscosity solutions, singular control problems, the face-lifting phenomenon.