The alien invasion or space invasion is a common feature in science fiction stories and film, in which extraterrestrials invade the Earth either to exterminate and supplant human life, enslave it under an intense state, harvest people for food, steal the planet's resources, or destroy the planet altogether.
The invasion scenario has been used as an allegory for a protest against military hegemony and the societal ills of the time. H. G. Wells' novel The War of the Worlds extended the invasion literature that was already common when science fiction was first emerging as a genre.
Prospects of invasion tended to vary with the state of current affairs, and current perceptions of threat. Alien invasion was a common metaphor in United States science fiction during the Cold War, illustrating the fears of foreign (e.g. Soviet Union) occupation and nuclear devastation of the American people. Examples of these stories include the short story “The Liberation of Earth“ (1950) by William Tenn and the film The Invasion of the Body Snatchers (1956).
In the invasion trope, fictional aliens contacting Earth tend to either observe (sometimes using experiments) or invade, rather than help the population of Earth acquire the capacity to participate in interplanetary affairs. There are some notable exceptions, such as the alien-initiated first-contact scenarios in The Day the Earth Stood Still (1951), Star Trek: First Contact (1996) and Arrival (2016). A trope of the peaceful first-contact is humanity attaining a key technological threshold (e.g. nuclear weapons and space travel in The Day the Earth Stood Still or faster-than-light travel in First Contact), justifying their initiation into a broader community of intelligent species.
Technically, a human invasion of an alien species is also an alien invasion, as from the viewpoint of the aliens, humans are the aliens. Such stories are much rarer than stories about aliens attacking humans. Examples include the short story Sentry (1954) (in which the "aliens" described are, at the end, explained to be humans), the video game Phantasy Star II (1989), The Martian Chronicles by Ray Bradbury, the Imperium of Man in the Warhammer 40,000 universe, Invaders from Earth by Robert Silverberg, Ender's Game, the movies Battle for Terra (2007), Planet 51 (2009), Avatar (2009) and Mars Needs Moms (2011).
As well as being a subgenre of science fiction, these kinds of books can be considered a subgenre of invasion literature, which also includes fictional depictions of humans invaded by other humans (for example, a fictional invasion of England by a hostile France strongly influenced Wells' depiction of a Martian invasion).
Within academia, prospects for an alien invasion of Earth are dismissed as Earth does not have any special resources that aren't already abundant elsewhere, among other reasons.