How to generate PWM using timer1 in atmega 328p

I am using Arduino UNO rev3. I want to generate a PWM wave on pin 6 of my arduino. If some one could give me a step by step guidance as to how i can write the arduino sketch for this. Also please tell me how i will be able to measure the PWM output generated using multimeter.

https://www.arduino.cc/en/Reference/AnalogWrite