You need to follow the upgrade guide. Most minor versions just consist of overwriting the systems folder, you can skip those (except for the last one of course). Upgrading within 2.x can be done pretty fast. Upgrading to 3.0 needs some more work, your controller,model etc files needs to be renemed to start with a capital. And check your own code against the list of deprecated / changed functions.
It's all in the upgrade manual...