XHTML is discontinued (even if it still can be used), so no need to bother with that. I guess one can say it was an attempt to get pages to use cleaner markup, but that never came off and as it was used it was basically the same as HTML with a little different syntax. It was possible to serve the same tag soup as before, the very thing XHTML was meant to put a stop to.
XHTML looks just like HTML with a few additions.
An IFRAME is a way to load another document in an embedded frame inside the current document. Nowadays it's mainly used for ads where JavaScript writes the iframe and loads the ad in it. You can see an example at this site's front page,
https://htmlhelp.com/. The rectangle with a blue border is an iframe written by JS, but no ad seems to be loading so it's empty.
https://htmlhelp.com/reference/html40/special/iframe.html