Whenever Apple releases a new version of its operating system, it's freely available to download and install on any Mac that supports it.
Windows 10 gets free updates, too, on a twice-a-year schedule.
However, if you're using an older version of Windows, including the still-popular Windows 7, or the more recent Windows 8 or 8.1, you're going to have to pay $120 or so to get current on Windows 10.
While Microsoft did offer that upgrade for free for the first year or so after Windows 10 came out, that time is long over.