The iPhone can view attachments in your email account depending on what that attachment is. For example, if you've got a GMail account synced with your iPhone and someone sends you an email with a Word document attachment, you can view that attachment in it's proper format right on the phone. However, by default there is no ability to modify it like you'd be able to if you actually opened it in Word or a document editor.
Below is a comparison picture of a document from gmail being viewed on an Android phone on the left, and an iPod (same as iPhone would) on the right. They are both displaying the same word document.
http://img.photobucke...yphadeus/IMG_4279.jpg
My partner uses an iPhone, mine is the Android phone. Neither of us really use the document viewing in the email apps for either, and when we do it's usually photos. There are apps for both systems that will allow limited editing of attachments though I believe.