The entrance of the Porter is supposed to be comic relief. In the previous scene Macbeth has murdered King Duncan and Lady Macbeth has framed the guards. The audience is on edge wondering who's knocking at the door and what will happen to Macbeth.
The Porter, still drunk from the night before, stumbles onto the stage to answer the door. He compares himself to the gate keeper a hell (a fitting job description considering the night's events) but remarks (possibly because of the early hour) it's too cold to be hell.
Knock, knock! Never at quiet. What are you? But this place is too cold for hell. I’ll devil-porter it no further. I had thought to have let in some of all professions that go the primrose way to the everlasting bonfire.
When the Porter answers the door, Macduff enters to pick up the king. Prolonging the inevitable- MacDuff finding the scene of the crime and his king killed- the Porter continues to joke with about the effects of drinking.
Marry, sir, nose-painting, sleep, and urine. Lechery, sir, it provokes and unprovokes. It provokes the desire, but it takes away the performance. Therefore, much drink may be said to be an equivocator with lechery. It makes him, and it mars him; it sets him on, and it takes him off; it persuades him, and disheartens him; makes him stand to and not stand to; in conclusion, equivocates him in a sleep, and, giving him the lie, leaves him.
This comical scene breaks the tension from previous scenes for a moment before finding Duncan's body.