How would you go about making a loop animation

Like, how would you go about making an image go to the left, then to the right, to create a loop ?
Cannot seem to figure it out (discovered pixieditor less than 24 hours ago)
Thanks for your help !!!