All courses offered at lagunita.stanford.edu are free. Courses on some of Stanford's other platforms may not be free. To find out if they are or not, go to the platform in question and click to sign up or register. In most cases, information will be provided on a course's specific enrollment page (if not on the listing page directly).
For example, at online.stanford.edu/courses/platform/NovoEd, you can click on a particular course's name and click on the "Go to Course!" button. From the page you are taken to, you will see if there is a fee for the course, or if it is free.
For SCPD courses at scpd.stanford.edu, fees may be noted under a Tuition section or in FAQs for specific courses.