Hydrogen cyanide adds across the carbon-oxygen double bond in aldehydes and ketones to produce compounds known as hydroxynitriles.
For example, with ethanal (an aldehyde) you get 2-hydroxypropanenitrile:

With propanone (a ketone) you get 2-hydroxy-2-methylpropanenitrile:

The reaction isn't normally done using hydrogen cyanide itself, because this is an extremely poisonous gas. Instead, the aldehyde or ketone is mixed with a solution of sodium or potassium cyanide in water to which a little sulphuric acid has been added. The pH of the solution is adjusted to about 4 - 5, because this gives the fastest reaction. The solution will contain hydrogen cyanide (from the reaction between the sodium or potassium cyanide and the sulphuric acid), but still contains some free cyanide ions. This is important for the mechanism.