A number of modern applications call for statistical tests that are able to consistently detect non-linear dependencies between a pair of random variables based on a random sample drawn from the pair's joint distribution. This has led to renewed interest in the classical problem of designing measures of correlation. When the considered random variables are continuous, it is appealing to define correlations on the basis of the ranks of the data points as the resulting tests become distribution-free. In this lecture, I will first review recent progress on rank correlations that yield consistent tests. In a second part, I will turn to the problem of detecting dependence between random vectors and discuss how to construct consistent and distribution-free tests with the help of a recently introduced approach to define multivariate ranks using optimal transport.