Every time you pick a profile picture, you are borrowing a word for a god stepping down from heaven.
The Sanskrit avatāra means "descent." It joins the prefix ava-, "down" or "off," to the verb root tṛ, "to cross over." Merriam-Webster glosses the verb form as "he descends." The idea is a crossing from the divine world into the material one.
The word does not appear in the Vedas, the oldest Hindu scriptures. It turns up in later texts, and as a noun it belongs especially to the Puranas, in writings from after about the 6th century CE. There it names the bodily forms a deity takes on earth. The best known are the ten avatars of Vishnu, a list that runs from Matsya the fish to Rama, Krishna and Kalki, a warrior still to come.
English picked up the word in 1784, in its religious sense. Within a few decades it had loosened. By 1815, according to Etymonline, "avatar" could mean any concrete embodiment of something abstract, as when a person is called the avatar of an idea.
The computer sense came from games. A 1979 role-playing game on the PLATO educational network was titled Avatar. In 1985 the designer Richard Garriott released Ultima IV: Quest of the Avatar. He chose the Hindu term on purpose: he wanted players to act as their real selves inside the game, and to own the moral choices their character made.
Lucasfilm's online world Habitat, first tested with players in 1986, used "avatar" for the figures that players steered around a shared space. That is essentially today's meaning.
Neal Stephenson's 1992 novel Snow Crash then carried the word to a much wider audience. His characters meet in a virtual "Metaverse" as avatars. Stephenson later said he had thought he coined that use, then learned that Habitat got there first.
The shift is smaller than it looks. In the old sense, a god takes on a body to act in a world it does not normally live in. In the new one, a person takes on a figure to act inside a screen. Both are descents.