The following scheme describes the interconversion between an aldose and a ketose, where R is any organic residue. 
The equilibrium or the reactant to product ratio depends on concentration, solvent, pH and temperature. At equilibrium the aldose and ketose form a mixture which in the case of the glyceraldehyde and dihydroxyacetone is also called glycerose. 
A related reaction is the alpha-ketol rearrangement.