Brahma, the creator of the universe, is depicted as having four heads, though originally he had five.
While creating the universe Brahma made a beautiful woman and named her Satarupa. But Brahma was changed by his own creation. He had never before seen such a fine beauty. To enable himself to see her from all angles he gave himself a second, third, and fourth head. Wherever Satarupa went she found Brahma's eyes staring at her. Disgusted, she rose skywards and in order to see her, Brahma created a fifth head for himself.
Lord Shiva, the destroyer, was watching all this and Brahma's actions greatly angered him. He felt that as Brahma had created Satarupa, she was like his daughter and it was his duty to protect her.
He felt that it was wrong on Brahma's part to be in love with her and to teach him a lesson Shiva struck off Brahma's fifth head.