In game lingo, when you animate, it's commonly called a sprite. You can download libraries to do the heavy lifting for you, for most major languages, if you're working at doing a game.
Otherwise, it's pretty simple; as the other poster noted, use a timer.