Physics students now have access to interactive molecular dynamics simulations that can model and animate the motions of hundreds of particles, such as noble gas atoms, that attract each other weakly at short distances but repel strongly when pressed together. Using these simulations, students can develop an understanding of forces and motions at the molecular scale, nonideal fluids, phases of matter, thermal equilibrium, nonequilibrium states, the Boltzmann distribution, the arrow of time, and much more. This article summarizes the basic features and capabilities of such a simulation, presents a variety of student exercises using it at the introductory and intermediate levels, and describes some enhancements that can further extend its uses. A working simulation code, in HTML5 and JavaScript for running within any modern Web browser, is provided as an online supplement.