Creating a folder on your host.
A basic text editor (download Notepad++ because its awesome).
Uploading a PHP file to your host.
Make text file and rename it to rotator.php (make sure windows displayes your file types).
Now copy this code inside the file:
Save the file and upload it and some banners in a folder on your host (ie, www.example.com/banners/ ). Then change whatever you're referencing from the image to the php script. That's it!