how to cange the material of an object using script(C#)

The question is this : how can i change the material of an object using script???

renderer.material - check out the docs here

thank you so much really useful;)