An Avatar is created by the Supercomputer automatically whenever a new person enters Lyoko for the first time. (Before a person first arrives on Lyoko, the picture on their Avatar shows a generic "person" icon.) Jeremie hypothesized in X.A.N.A. Awakens that the Supercomputer is able to do this by taking the subconscious desires of a person and projecting them in the form of an Avatar. However, it is unknown if this is actually true or if other methods to create Avatars exist. An Avatar contains the information about the person's Life points, weapons, etc. Jeremie's Avatar has not yet been shown, leaving opportunity for the fans to create it. Avatars contain the Team's Lyoko ID Cards as well.
Avatars, according to Jeremie's explanation in Revelation, are stored within the restricted access part of the Supercomputer, meaning their minds can't be directly possessed by X.A.N.A. unless their programming was modified in any way. New ones can be created at any time. Whenever a Lyoko Warrior is hit by a laser, a display comes up showing the template and a spot on the body that glows yellow and red. This indicates a loss of Life points.
It is also possible to create extra weapons different from the ones that came with the avatar, as we saw in Franz Hopper. The Lyoko Warriors received new Avatars in season 4 due to special programming. This altered them by giving them better powers, extra powers and a way to summon a ride (in Aelita's case)