For most hydrangeas, flowers are produced on last years wooden stems. Therefore, when pruning, you need to choose a strategy. You can either prune after flowering in the late summer, or prune in early spring before new growth begins. Start by removing any dead, damaged or diseased wood. Remove old flowers by cutting stems back to just above the uppermost buds. You can clean up overgrown hydrangeas by pruning hard in early spring, but you may be sacrificing this years flowers.
A new series of Hydrangeas called the 'Endless Summer' series produces flowers on both old and new wood. These varieties can be pruned at virtually anytime without sacrificing any flowers.