Hairpins are formed through intramolecular base pairing. In RNA, this involves complementary bases—adenine (A) pairing with uracil (U) and guanine (G) pairing with cytosine (C). When a sequence of RNA has regions that can base-pair with each other, the molecule can fold back on itself, creating a stem-loop structure. This folding is often facilitated by the cellular environment and various RNA-binding proteins.