Molecular chaperones are ATP-consuming biological machines, which facilitate the folding of proteins and RNA molecules that are kinetically trapped in misfolded states for long times. Unassisted folding occurs by the kinetic partitioning mechanism according to which folding to the native state, with low probability as well as misfolding to one of the many metastable states, with high probability, occur rapidly on similar time scales. GroEL is an all-purpose stochastic machine that assists misfolded substrate proteins (SPs) to fold. The RNA chaperones (CYT-19) help the folding of ribozymes that readily misfold. GroEL does not interact with the folded proteins but CYT-19 disrupts both the folded and misfolded ribozymes. Despite this major difference, the Iterative Annealing Mechanism (IAM) quantitatively explains all the available experimental data for assisted folding of proteins and ribozymes. Driven by ATP binding and hydrolysis and GroES binding, GroEL undergoes a catalytic cycle during which it samples three allosteric states, referred to as T (apo), R (ATP bound), and R (ADP bound). In accord with the IAM predictions, analyses of the experimental data shows that the efficiency of the GroEL-GroES machinery and mutants is determined by the resetting rate $k_{Rrightarrow T}$, which is largest for the wild type GroEL. Generalized IAM accurately predicts the folding kinetics of Tetrahymena ribozyme and its variants. Chaperones maximize the product of the folding rate and the steady state native state fold by driving the substrates out of equilibrium. Neither the absolute yield nor the folding rate is optimized.