Generation 1
Generation 1 (or just simply G1) is a rather vague blanket term that was created after the fact by fans after the Transformers Generation 2 line was released in 1993. So if you consider G1 to be anything Transformers related that was released before G2, then G1's era is from 1984-1993 which includes:
The Transformers cartoon (Four seasons spanning 1984-1987)
The Transformers: The Movie (1986) which, chronologically sits between the second and third seasons of the cartoon.
The Transformers comic book series (with its own continuity) published by Marvel that ran from 1984-1991, ending abruptly without finishing its story. In 2012, IDW published a conclusion to that series (and disregards the events of G2) called Transformers: Regeneration One written by Simon Furman, one of the original writers.

G1 Megatron
Generation 2
Launched in 1993, it's set in the same continuity as G1 (though it jumps ahead in time and doesn't fully conclude the G1 comic story). It also crosses over into the G.I.Joe franchise. It features some new characters and redesigns of older ones. Other than toys it includes:
Transformers: Generation 2 comic book series published by Marvel from 1993-1994.
Transformers: Generation 2 cartoon series which was just re-broadcasted episodes from the original US cartoon with some CGI overlays.

G2 Megatron
Semi-Generation 1
The Japanese produced their own animated shows that diverged from the original US series after the second season, launching its own G1 continuity. Those shows are (chronologically):
Fight! Super Robot Lifeform Transformers (The original series with some changes and new animation, notable the OAV Scramble City).
Transformers Headmasters (1987)
Transformers Super-God Masterpiece (1988)
Transformers Victory (1989)
Transformers Zone (1990)
There's also two more recent comic book series that reuse a lot of the story and visual elements of G1.
Dreamwave's comic book run which ran from 2001- 2005
IDW's comic book run which started in 2005 and still being published today

IDW's Megatron (latest version)