Mathematica provides built-in Legend functionality for charting functions such as BarChart and PieChart. For plotting functions such as Plot, ListPlot and DateListPlot, the PlotLegends` package is available. However it is slow and difficult to customise. The ShowLegend function provided by that package offers a little more control. Generally, however, both performance and aesthetics are better if one uses a custom function such as this one.

Please consider using one of the tags or according to whether your question is about 2D or 3D graphics.

Useful links:

Example questions:

history | show excerpt | excerpt history