Script for changing material?

Hi, does anyone know what script should I use, for making the material of an object to change?