As far as Android is concerned, they're the same app, and Hangouts is just a new update for Talk which happens to change the user-facing name. (Apps also have a package name, which is how Android decides if they're the same app.) It works like any other update: it completely replaces the old version in your phone's internal storage. Like any other update, once you've updated, you can't go back to the version you had before.
But in this case, Talk is an app that's built into your ROM (assuming you're not on a custom ROM: if you don't know, you're not). Like any other app from the ROM, you can uninstall all updates and go back to the original version. To do this, go to the Settings app, go to the Apps page, find Hangouts in the list of apps, and click Uninstall updates. This won't restore the version you had before the update: it'll go back to the original version that was on the phone last time you did a system update. (If you've never done a system update, that's the version that was on the phone when you took it out of the box.) There's no guarantee that such an old version will continue to work.