Recent table-top optical interferometry experiments and advances in gravitational-wave detectors have demonstrated the capability of optical interferometry to detect displacements with high sensitivity. Operation at higher powers will be crucial for further sensitivity enhancement, but dynamical effects caused by radiation pressure on the interferometer mirrors must be taken into account, and the appearance of optomechanical instabilities may jeopardize the stable operation of the next generation of interferometers. These instabilities are the result of a nonlinear coupling between the motion of the mirrors and the optical field, which modifies the effective dynamics of the mirror. Such 'optical spring' effects have already been demonstrated for the mechanical damping of an electromagnetic waveguide with a moving wall, the resonance frequency of a specially designed flexure oscillator, and the optomechanical instability of a silica microtoroidal resonator. Here we present an experiment where a micromechanical resonator is used as a mirror in a very high-finesse optical cavity, and its displacements are monitored with unprecedented sensitivity. By detuning the laser frequency with respect to the cavity resonance, we have observed a drastic cooling of the microresonator by intracavity radiation pressure, down to an effective temperature of 10 kelvin. For opposite detuning, efficient heating is observed, as well as a radiation-pressure-induced instability of the resonator. Further experimental progress and cryogenic operation may lead to the experimental observation of the quantum ground state of a micromechanical resonator, either by passive or active cooling techniques.