An avatar is a body that contains the soul/mind of another being, like a deity. Could also be a human being implanting their mind into a blue alien like in the movies. Or it could be Aang’s body being the physical vessel for ancestral benders of many tribes.
On computers, an avatar is the actual character that you build for a game or website. For example, Yahoo used to have avatar builders. Then features were added where forums would show a picture of your avatar and people would call the picture itself the avatar, as shorthand. But they’re two distinct things. A profile picture does not need to be a representation of the person (avatar), it can be a picture of anything at all.
Avatar dates to early graphical bulletin boards and MUDs in the 80s. Originally it was used as a synonym for "Player Character" (after Moorcock and his Avatars of the Eternal Champion) and spread from there. PFP is a post-facebook thing.
I wonder if the Ultima series had anything do with that, since the player character was called the Avatar. NATOpedia seems to support that, claiming that Ultima IV popularized the use of the term avatar in this context.