If you are talking about an animated gif, first you'll need multiple states with timing set in 100ths of seconds. Then you'll have to set your looping preferences in the lower left of the state pane. Then you'll go to File>Image Preview, choose animated gif and set other export options. Once you export it should work fine in applications meant to handle animated gifs, such as a web browser. Some other image preview apps are not designed to render animated gifs and may display just one frame or frames as separate images.