This book provides a comprehensive and user-friendly exploration of the tremendous recent developments that reveal the connections between real algebraic geometry and optimization, two subjects that were usually taught separately until the beginning of the 21st century. Real algebraic geometry studies the solutions of polynomial equations and polynomial inequalities over the real numbers. Real algebraic problems arise in many applications, including science and engineering, computer vision, robotics, and game theory. Optimization is concerned with minimizing or maximizing a given objective function over a feasible set. Presenting key ideas from classical and modern concepts in real algebraic geometry, this book develops related convex optimization techniques for polynomial optimization. The connection to optimization invites a computational view on real algebraic geometry and opens doors to applications. Intended as an introduction for students of mathematics or related fields at an advanced undergraduate or graduate level, this book serves as a valuable resource for researchers and practitioners. Each chapter is complemented by a collection of beneficial exercises, notes on references, and further reading. As a prerequisite, only some undergraduate algebra is required.