Upgrading Drupal sites between major versions can be tricky. The community of developers that numbers in the thousands has taken great care to maintain upgrade path between adjacent versions of the content management system. This is especially true of Drupal's core, though one must go through each version to get to the destination. (An example: going from Drupal 5 to Drupal 7 requires passing through Drupal 6.) Contributed module upgrades take place with a very slight degree of peril, though typically a developer will include upgrade paths between major versions. Though incredibly rare, some modules will not upgrade their database to the new version of the module, and even then someone will flag it as an issue and it will get resolved.
If you came here looking for guidance on upgrading your Drupal site, please consider visiting the official documentation at Drupal.org. The following only deals with two specific cases that may not apply to your site. Read more about Upgrading Drupal Sites: Two Case Studies and a Spreadsheet