A weighted graph is a type of graph in which each edge has an associated numerical value, called a weight, which often represents costs, distances, or capacities. These weights are crucial for algorithms that find optimal paths, such as Dijkstra's or Prim's, which are used in network routing, resource allocation, and various optimization problems.