ggplot2 is a grammar of graphics package for creating plots in R. It allows building graphs from data, a coordinate system, and geoms (visual marks). Geoms represent data points and their aesthetic properties like color, size, and position on the plot. Common geoms include points, lines, and bars. Scales map data values to visual properties. Coordinate systems define the space in which geoms are drawn.