This book is an introduction to maximum-entropy models of random graphs with given topological properties and their applications. Its original contribution is the reformulation of many seemingly different problems in the study of both real networks and graph theory within the unified framework of maximum entropy. Particular emphasis is put on the detection of structural patterns in real networks, on the reconstruction of the properties of networks from partial information, and on the enumeration and sampling of graphs with given properties. After a first introductory chapter explaining the motivation, focus, aim and message of the book, chapter 2 introduces the formal construction of maximum-entropy ensembles of graphs with local topological constraints. Chapter 3 focuses on the problem of pattern detection in real networks and provides a powerful way to disentangle nontrivial higher-order structural features from those that can be traced back to simpler local constraints. Chapter 4 focuses on the problem of network reconstruction and introduces various advanced techniques to reliably infer the topology of a network from partial local information. Chapter 5 is devoted to the reformulation of certain "hard" combinatorial operations, such as the enumeration and unbiased sampling of graphs with given constraints, within a "softened" maximum-entropy framework. A final chapter offers various overarching remarks and take-home messages.By requiring no prior knowledge of network theory, the book targets a broad audience ranging from PhD students approaching these topics for the first time to senior researchers interested in the application of advanced network techniques to their field.