A literary movement is defined by a group of writers with shared ideas about a number of things ranging from: style, content, philosophy, sociological concerns, art, culture, etc. A literary movement can be in opposition a current literary movement. For example, in England, Romanticism (approximately 1789-1832) was seen as a reaction to Neoclassical literature (approximately 1660-1789). Dates of literary periods are always debated.
The dates of movements are often historically influenced, or sometimes for the sake of efficiency, these periods are often synced with significant historical events. For instance, the beginning of Romanticism is sometimes listed as 1789, the first year of the French Revolution. There is added significance in that the French Revolution marked the beginning of the decline of monarchies with the rise of democracy, while Romanticism celebrated individualism (which would have more impact in a democracy than in a monarchy). In this case, the movement (Romanticism) was influenced by, and reciprocally influenced, the political effects of the French Revolution.
This is not to say that all Romanticism can only have occurred in this time period. There are writers today who could be defined as Romanticists. It is just that the movement formed, flourished, and was defined during this time.
There are also movements within movements. Modernism (approximately late 19th century - the 1960s) contains many similar and/or different movements: Magical Realism, Surrealism, Futurism, Imagism, and Theatre of the Absurd - to name a few.