Quoting from Google: WordPress is a free and open-source blogging tool and a content management system (CMS) based on PHP and MySQL. Read more on WordPress’s wikipedia page:

A WordPress Theme is a collection of files that work together to produce a graphical interface with an underlying unifying design for a website. These files are called theme files. A Theme modifies the way the site is displayed, without modifying the underlying software.

See more on WordPress’s CMS Official Website