In old England, people couldn't have sex without the consent of the king (unless they were members of the royal family). When a couple wanted to have a child, they had to ask the king permission. When granted, the monarchy gave the couple a plaque to hang outside their door while having sex. The plaque read "Fornication Under Consent of the King" (F.U.C.K.).
It's the origin of probably the most used and versatile cuss word.