Old rusty nails were often tried in times past, to turn flowers blue. It was not totally wrong as hydrangeas do need iron, but there are better ways. To achieve good blue flowers, aluminium must be present in the soil which must also be acid, and yes, you need iron as well (preferably in sequestered form, unlike nails) to make the aluminium available to the plant. You can obtain hydrangea colourant powder in any garden centre, and if you have or can create acid conditions, you can have beautiful blue hydrangeas.