In the last twenty years, Probabilistic Graphical Models (PGMs) have emerged as a most effective tool for solving artificial intelligence problem in general and in particular for bioinformatics applications. This course introduces what PGMs are and reviews the different types of questions that we can answer through its use. We cover algorithms that allow us to provide an exact answer to such questions, and establish when this answer can be provided in polynomial time. For those cases when no polynomial time exact algorithm exists, we review approximate inference techniques. In particular, we concentrate on structured variational approaches and variational expectation maximization. Along the course, exercise sessions will be used to show how the theoretical results in the lectures can be applied to particular bioinformatics problems, with an emphasis in molecular phylogenetics.