It is an add-on keyboard for your iPhone, iPod, or iPad. After iOS5 it comes built in an can be accessed in Settings. Open your settings and go to General, then Keyboard, then International Keyboard, then Add New Keyboard. Find Emoji in the list and tap it. Now when you go back to your Messages and open your keyboard you'll see a globe in the bottom left corner. Tap the globe to access your Emoji and tap it again to go back to your normal keyboard.
Earlier iOS versions from 2 through 4 need to download an app from the App Store to install a third party keyboard.