In this talk, I will first review our current understanding of skyrmion crystal formation. Then I will present a generic theory about skyrmion crystal (SkX) formation and the fascinating thermodynamic behaviours in chiral magnetic thin films. We will see that a chiral magnetic film can have many metastable states with an arbitrary skyrmion density up to a maximal value when a parameter k measuring the relative Dzyaloshinskii-Moriya interaction (DMI) strength is large enough. We will explain why a film prefers a stripy state, such as a helical state, at a low field, and an SkX around an optimal field when k is above a critical value. Decrease of k value explains why SkXs become metastable at low temperature in most skyrmion systems.