Random Image

Is there a way to display a random image? If so could someone tell me the code or point me in the way of a tutorial? thanks.