Yes, you can.
Today, most online casinos are browser-based and you play all the games directly in your browser window. The capacity of your browser will be the determining factor, not the operative system of your computer.
The distinction between playing on a Windows computer or a Mac computer was more important in the olden days when downloaded casino clients were more common. Among the casinos that still offer downloadable casino clients, it is common to only offer a casino client developed for Windows.
You can also play i on your iPhone and iPad.