The Self-Coherent Camera is dedicated to the direct detection of exoplanets. This instrument can be used as a focal plane wavefront sensor to measure static aberrations that induce speckles on the detector, which prevents the detection of faint companions. The Self-Coherent Camera creates a reference beam in the Lyot stop pupil plane in order to spatially modulate the speckle pattern with Fizeau fringes. We can then estimate for wavefront aberrations upstream of the coronagraphic mask and correct for them using a deformable mirror. Currently, the Self-Coherent Camera is combined with a deformable mirror located in the pupil plane upstream of a Four-Quadrant Phase Mask Coronagraph. In this paper, we present the formalism that explains how the Self-Coherent Camera encodes speckles and how we estimate the wavefront aberrations directly from the science image. We present numerical simulation results on speckle suppression in the focal plane. Then, we give experimental results on wavefront correction on our optical bench using a 32x32 actuators deformable mirror. We show that we can improve the contrast in the focal plane by a factor of more than 100 in the PSF wings up to 12/λD.