WordPress is open source and is free to use. There is no annual licensing to use WordPress itself. Anyone can create plugins that provide additional functionality to a WordPress site or create a theme that defines the look and feel of a site.
The below infographic from YourEscapeFrom9to5 can provide more tips on how to protect your site from hackers.

Infographic by: yourescapefrom9to5.com