The creation of a hypernucleus requires the injection of strangeness into the nucleus. This is possible in different ways, mainly using pi+ or K- beams on fixed targets. A review of hypernuclei production by K- at rest is here presented. When a K- stops inside a nucleus it can undergo the so called strangeness-exchange reaction, in which a neutron is replaced by a Lambda with the emission of a pion. By precisely studying the outgoing pions both the binding energy and the formation probability of the hypernuclei can be measured. New measurements from the FINUDA experiment on 7Li, 9Be, 13C and 16O, coupled with previous measurements on 12C and 16O, allowed for the first time the study of the formation of hypernuclei as a function of the atomic mass number A. The new measurements also offered the possibility of disentangling the effects due to atomic wave-function of the captured K- from those due to the pion optical nuclear potential and from those due to the specific hypernuclear states. These new results on the study of the hypernuclei production by K- at rest are here presented and discussed.