HTML and XML are both markup languages (hence the *ML). XML is a generic markup language suitable for representing arbitrary data, while HTML is a specific markup language suitable only for representing web pages.
HTML and XHTML are both subsets only of SGML, except that XHTML has additional specifications so that it also validates as XML. Think of XML as XHTML's influential godfather.
Because of this relationship to SGML across all 3 of these languages, there are a lot of similarities, but they are all considered different languages. However, much of what defines these languages is their restrictions on SGML.
HTML restricts SGML by defining a list of tags that are allowed to be
XML restricts SGML by not allowing unclosed or empty start and end
tags, and forces attributes to be explicit. XML also has a large
number of additional restrictions that are not found in SGML.
XHTML restricts SGML with the tags from HTML (with some exclusions,
such as frameset, et al), and with the tag and entity restrictions