It refers to the body in side your IFRAME. jQuery will always work in the context of the current (first parent) document. If you want to specify a different context, that is when you use jquery's context arguments.
http://api.jquery.com/jQuery/#jQuery1
jQuery( selector, [context] )
selector: A string containing a selector expression
context: A DOM Element, Document, or jQuery to use as context
So $('body')
refers to the document inside your IFRAME and can be thought to be implicitly doing: $('body', document);
To get the document of the parent frame you would have to do something like $('body', parent.document);
. This would of course be subject to cross-frame restrictions, depending on how you're doing this.