To put it simply: The API version decides a couple of things for the Apex class - what fields you can access on a particular object or how you can implement certain mechanics.
And you're correct - API versions are used to introduce new features as well as deprecate old ones. Think of it as a way to decide what collection of functionality you want to use.
What is the best practice is an entirely different question - but to give you a very basic idea for this: Different API versions can give you all kinds of weird errors and behavior. From my personal experience, it is best to upgrade your API versions from time to time, so you have a consistent and recent version over all your classes and throughout your org.
What are all of the reasons why Salesforce customers should upgrade the API version on their Apex classes, triggers, and pages?