Correlation coefficient is a numerical measure of direction and strength of linear correlation between two variables. Several types of correlation coefficient are defined using various formulas. But Pearson correlation coefficient also known an Pearson product moment correlation coefficient is the most commonly used to describe the linear relationship between two variables, Indeed the term Correlation Coefficient is often loosely used to refer to Pearson Correlation Coefficient.
The formula used to compute Pearson correlation coefficient 'r' is as follows:
r = $\frac{cov(x, y)}{\sqrt{var(x)}\sqrt{var(y)}}$
The covariance between two variables is the average of product of deviations of both the variables from their respective means.
cov (x,y) = $\frac{1}{n}\sum$$(x-\overline{x})(y-\overline{y})$

Covariance is indeed an easily understandable measure of relationship between the two variables x and y. But the value of covariance is altered by the scale and units of measurements used. Pearson's Correlation coefficient eliminates this deficiency. In Pearson's moment correlation formula, the deviations from the means are expressed as fractions of standard deviations of each variable. Thus Pearson correlation coefficient calculated for same data with different scales or units will give the same value. Hence the measure of relationship got using Pearson's formula is more dependable.

The above formula leads to an easily workable formula for sample data given in a table.
r = $\frac{n(\sum xy)-(\sum x)(\sum y)}{\sqrt{(n(\sum x^{2})-(\sum x)^{2})(n(\sum y^{2})-(\sum y)^{2})}}$

We can understand the relationship between two variables from the computed value of Pearson Correlation Coefficient. The range for this value is between -1 and 1 both values inclusive. The sign of calculated r tells us about the direction of the correlation and the absolute measure gives the strength of the correlation.
Pearson Correlation Coefficient Interpretation
When the absolute value of Pearson correlation coefficient is close to 1, the correlation is described as strong. When the absolute value of r is between 0.5 and 0.8, the variables are said be moderately correlated and when it is between 0.2 and 0.5, the correlation is said to be  week. r = 1indicates a perfect positive correlation and r = -1 a perfect negative correlation. When r is close to zero it is considered that no correlation exists between the two variables.