Actually it's Siri Dictation, which is not the same thing (but does confusingly share the same name). Siri Dictation is born out of Apple fusing of Dragon Dictation (I'll come back to DD in a second) and the original Siri, which was a virtual assistant program that didn't do nearly as much then as it does now.
Fusing the two concepts together was an incredibly clever idea on Apple's part.
So anyway: Siri Dictation is only available on the iPhone 4S and third-gen iPad (in fact, though I happen to be typing this rely because I am sitting at my desk, I often dictate my posts here with Siri on my iPad). However, Dragon Dictation is available for the iPhone 4 and other models. It does not work quite the same way, but it works very well.
With DD, you open the program, then record what you want to say (remembering to speak out the punctuation, and things like "open parentheses" and "close parentheses," "quote" and "unquote" and even things like "all caps" and then the word that you want in all caps, etc).
Once that's done, unless you're quite good at it you'll need to do a little bit of editing (which quickly becomes "almost no editing" once you've gotten the hang of it) and then copy what's written and paste in the application you actually wanted it in. Sounds like more work than it is.
DD is available from the App Store. Highly recommended for people who can compose and dictate and want to do so while on the go.