Hugin is a powerful tool for taking two or more photos of the same scene, and using them to create spectacular panoramas. (The program is popular, so you don't need to take our word for it: a quick check of Flickr images with the "Hugin" tag will give you an idea what it can do.)
The program has plenty of options to help you produce the best possible results. You're able to blend your images based on multiple control points, for instance (well defined features which appear in each photo). Hugin uses camera and lens data to better understand how barrel distortion and other issues might affect individual images. It then blends them as accurately as possible, compensates for any exposure variations or vignetting issues, centralises and straightens the picture and exports the results for you. (Eventually, anyway: the program can be rather slow.)
And these photo correction features can be useful even if you're not interested in panoramas, as for example you can use the same features to fix barrel distortion problems or remove perspective effects from even a single photograph (there's an example of how this works on the Hugin site).
If this sounds a little intimidating, then it's true, initially at least you might think it's going to involve quite a lot of work - there are lots of concepts to learn and options to figure out. All the really tricky bits are handled automatically, though. The Hugin site also has some step-by-step tutorials (with sample images) which you can use to help master the basics, and more general help, if you need it, is available on the Hugin mailing list.