A graph is a non-linear data structure consisting of nodes and edges that connect pairs of nodes. There are different types of graphs including undirected graphs where edges have no direction, directed graphs where edges have a direction, weighted graphs where edges have associated weights, and unweighted graphs where edges have no weights. Common graph types include complete graphs where every node is connected to every other node, bipartite graphs where nodes can be divided into two disjoint sets with edges only between the sets, trees which are connected graphs without cycles, and cycles which are graphs that contain at least one cycle.