I want to have a gif or jpg move a little on the screen and then stop after awhile.

How would I go about coding this?