All Jötnar were originated from the progenitor of their kind, the first Jötunn Ymir. Ymir himself was born from mythical substance Eitr, formed by combination of sparks of Muspelheim and frost of Niflheim along with Audhumla, primordial cow that acted as the source of his nourishment. Being a hermaphroditic Jötunn, his body conceived numerous smaller Jötnar when he slept. Things eventually changed when Buri, the first Æsir and progenitor of Gods of Asgard, was conceived from a salt lick consumed by Audhumla. Buri then had a son named Borr, who sired three children with Bestla, one of Ymir's descendants, and named them Odin, Vili, and Ve.
The Æsir's presence sparked a tension between them and Ymir's brethren which soon sparked into a battle that culminated to Odin and his brothers slew Ymir, flooding the whole world with the first Jötunn's blood and killing most Jötnar in process. Only Bergelmir and his wife who managed to survive the ensuing disaster and subsequently repopulate the recovered Nine Realms. Since then, the Jötnar harbored intense hatred toward the bane of their predecessors and their descendants Æsir and Vanirs.
Throughout attestations in the Old Norse records, it is said that the relationship between Jötnar and the Gods is more complex than good and evil, let alone light and darkness. The Gods of Asgard perceived Jötnar as unlikely allies and nuisance at best and bitter enemies at worst as shown through their dynamic with Loki. Loki's mischief and pranks troubled the Gods again and again despite of them accepted him as one of their own. Though some argued his actions were stemmed from mistreatments on both him and his children by the Gods due to prophesied calamities that they would bring to the Nine Worlds, it must be stressed that Loki's inherent bigotry against the Gods IS the major reason of the aforementioned misery they gone through.
Comparison to Giants and the Gods of Asgard
Though the term has become a catch-all phrase for any kind of giant, troll, ogre, or even orcs in various portrayals of Norse mythology in popular culture, Jötnar in myths are actually neither. In truth, Jötnar are primordial gods and related to Æsir in many ways albeit representing primal, untamed and destructive aspects of nature, and many were more placated than worshiped. Moreover, unlike stereotypical mythological giants and their relatives, Jötnar are not necessarily notably large and may be described as exceedingly beautiful or as alarmingly grotesque, and thus stands out from the former thanks to their divine nature and powers.
The most ancient of Jötnar race, Frost Jötnar were among the first of the Jötnar created when the world began, symbolizing the time before the gods existed. Majorities of these Jötnar flourished at the realm of Jotunheim, one of the Nine Worlds, though some can be found at Muspelheim and Midgard.
Fire Jötnar are eager participants at Ragnarok and believe in the fiery destruction of the cosmos. They are arguably descendants of both Bergelmir and Ymir who inhabited Muspelheim and evolved into Jötnar race they were now. The most famous of the fire Jötnar was Surtr, Fire Jötunn who guarded the gates to Muspellheim.
Not all Jötnar are born equal. Some are born as monsters and viewed as such despite their divine lineage. Many of them resemble animals in physiology and appearance, but still as powerful as their humanoid brethren. Examples includes Jörmungandr, Hræsvelgr, Sköll and Hati, and Fenrir.
In Popular Culture
As with well-known figures of Norse Mythology, Jötnar have been described in many films, comics, videogames, and books, as well as traditional lore. Some portrayals of these entities however, depicted them as storybook giants, trolls, and/or ogres as opposed to divine beings in myths.
In Marvel comics universe and live-action adaptations (particularly Marvel Cinematic Universe series), Jötnar also featured with similar role and relationships with the Gods of Asgard as with in myths, though the term solely applied to Frost Giants as the franchise replaced Fire Jötnar with equally powerful Fire Demons (though they nevertheless share many aspects to the former such as being natives of Muspelheim instead of Hell as their name suggested).
In 2017 film, Moder, is a Jötunn who is described as Loki's child.