They are one of two clans of Norse gods, the other being the Vanir. The Aesir and Vanir were in conflict for quite some time, leading to the Aesir-Vanir war. Later on, however, they seemed to get along just fine and the Vanir were eventually considered to be a sub-group of the Aesir.
Therefore, depending on the time in which a specific myth is set, the word Aesir may refer to all Norse gods or only to the ones that began as Aesir.
In Norse mythology, there are nine world that various beings may inhabit. These worlds are held in the branches of the World Tree, also known as Yggdrasil. We humans live in Midgard, whereas the Aesir live in Asgard. The Vanir have their own world: Vanaheim.
Although they lived in a different world to humans, they actively ruled over the lives of men. Norse people would call on the different gods who represented specific aspects of life when they needed aid or blessing. There are many stories surrounding the Aesir, such as that of Odin the Allfather coming to Midgard. They would teach people lessons or otherwise influence what happened in Midgard.
The Aesir also acted in other worlds in Yggdrasil, such as Jotunheim, where the ice giants live. One of their most important duties is to keep the ice giants at bay, protecting the worlds from them.
Interestingly, although the Aesir are the principal gods of Norse mythology, they are not the creators of the cosmos. They are, however, the creators of mankind and the worlds within the cosmos.
In the beginning, there were two worlds: Muspelheim and Niflheim. Muspelheim was the realm of fire, while Niflheim was the realm of ice. Between them lay an empty void known as the Ginnungagap. The fire and ice met and filled the gap, and from this event, the first giant, Ymir, was formed. Ymir’s sweat produced further giants, who were the first beings in the cosmos. As the frost melted, the cow Audhumbla emerged to feed Ymir. The cow lived on the saltlicks in the ice. Her licking revealed Buri, the first Aesir, who had apparently been stuck in the ice.
Buri went on to marry a giant, Bestla, so his children Odin (who is the most famous), Vili and Ve were all half-giants. These three brothers decided to end Ymir’s life and, in a rather grisly development, used the various parts of his body to make the world. For example, his blood became the oceans, and the dome of his skull became the sky.
These gods then got around to creating us, the humans of Midgard. The first humans were a male and female pair with the names Ask and Embla. When they had finished jump-starting humanity, the gods decided to give humans their own world, a fenced-off region they named Midgard.
But why did they feel the need to slay Ymir? The most likely reason is that Ymir was a being of chaos, and the Aesir’s purpose is to bring order to the cosmos. That’s also the root of their main struggle with the ice giants, who want to destroy the world during Ragnarok, restoring the primordial chaos of the Ginnungagap.