An HTML iframe is used to display a web page within another page by using the <iframe> tag, which specifies an inline frame for embedding external content. The height and width attributes determine the iframe size in pixels, and an iframe can be targeted by links using the target attribute referring to the iframe's name.