In these four lectures we will review the methods and results of statistical physics applied to high-dimensional computational problems. We will cover problems in combinatorial optimization, constraint satisfaction, statistical inference and learning. The common thread to these problems will be instances drawn from some probability distribution for which there exists a closed-form description of the properties of the underlying probability measure in the high-dimensional limit (e.g. marginals of the Boltzmann distribution associated to a given loss-energy landscape or of the posterior distribution). We will describe the underlying methods how to obtain these solutions, the associated message-passing algorithms, as well as the resulting insights about phase transitions and associated (conjectured) computationally hard regions.