A hypothesis test formally tests if there is correlation/association between two variables in a population.
The hypotheses to test depends on the type of association:
When the test p-value is small, you can reject the null hypothesis and conclude that the
population correlation coefficient is not equal to the hypothesized value, or for rank
correlation that the variables are not independent. It is important to remember that a
statistically significant test may not have any practical importance if the correlation
coefficient is very small.
Pearson's and Kendall's tests are preferred as both have associated estimators of the population correlation coefficient (rho and tau respectively). Although the Spearman test is popular due to the ease of computation, the Spearman correlation coefficient is a measure of the linear association between the ranks of the variables and not the measure of association linked with the Spearman test.