This course serves as an introduction to the basic principle of molecular simulations using molecular dynamics and Monte Carlo sampling. We will present the algorithms and techniques used to implement these sampling methods. We will show how molecular simulations can be analyzed using the concepts of order parameters and free energy surfaces. We will also discuss the challenges of obtaining proper sampling in molecular simulations and how they can be tackled by employing advanced sampling techniques like umbrella sampling, metadynamics, and replica-exchange. The techniques and algorithms introduced will be motivated by considering real-life applications of molecular simulations in various fields of physics, chemistry, and biology. Hands-on examples will be presented using simple programs and open source software packages. Final examination will be based on projects where the students need to implement some of the methods and algorithms covered in the course.