As stated above graphite is a release agent for all types of forging, extrusion, stamping, or any metal work where a die form is used.
Besides being a release agent it's primary function is a lubricant the allows the metals to better conform to a die. It is essential in dies were the part has to have a shallow draft, closer to straight sides. The more intricate the die the more the lubricant aspect comes into play. It makes a lot of forgings and castings feasible that otherwise would couldn’t be made’.
The problems with graphite and aluminum forgings mention by skylerf can be minimized or in most case taken totally out of the picture with the proper choice of graphite lubricant/release agent with a proper application.
There is some science involved, but a also a hell of alot of black art and experience involved in the selection of graphite lubricant.