Strategy sub-genre focusing on managing a whole empire, with full access to the whole game world at all times, management of cities of equivalent, troop movement on strategic level, multiple ways to win, and others.
Alternate names: eXplore, eXpand, eXploit, and eXterminate, eXploration, eXpansion, eXploitation and eXtermination
The first video game about 4X was released in 1971.
* Single expansive world with no map transitions (universal theatre)
* Research into ever better technology in great variety of subjects such as healthcare, bioweapons, mechanics, etc. many of which are unrelated to warring and resource gathering.
* Multiple screens (modal) for management
* Multiple eras (panhistoric)
* Grand scale (Colonization and similar are not this yet are 4X)
* Random events
Besides militaristic victory, following other victory conditions may also exist:
* Political - being elected the ruler of all relevant nations
* Cultural - your culture being propagated so much no-one has any reason to fight/oppose each other anymore, because you're essentially all the same
* Religious - possibly identical to cultural one, but requires nations are very religious to have the weight
* Faux union - coercing, body doubling, mind controlling, etc. the leaders (or even the entire population) of the other nations so they can do the above political union with you. Including fantastic variations such as you leading a species of body snatchers who overtake the other nation. Can easily be considered the same as terrorism, but far less noticeable to the outside.
* Terrorism - assassinating the leaders, or otherwise terrorizing the leaders or the population so much that they don't dare to oppose you in fear of reprisal. Also covers Sword of Damocles style tactics, such as threat of nuclear weapons or similar WMDs.
* Science - usually similar to militaristic one, but where your technology reaches a point where they simply can't do anything to your military and thus forfeit instead of killing off countless of their soldiers in vain attempt to defeat you. Easily overlaps with faux union and/or terrorist victory (via Sword of Damocles type)
Most of the above don't appear in vast majority of games, either because they don't track them or they are impossible (e.g. technological victory is unlikely because the opposing nation can simply research the same stuff, if they manage it)
Note: what the 4X stands for is actually a horrible misnomer for what the genre is about since they can easily be used to describe any strategy game with base building and resource harvesting (e.g. Starcraft) which definitely are not part of this genre.