Robert Browning's poem "Porphyria's Lover" is written in a genre known as the dramatic monologue, in which the narrator of the poem seems to be speaking to himself or an unknown reader or audience, in much the same way a character in a drama does in a soliloquy. In Browning's dramatic monologues, as the speaker talks about particular circumstances, the speaker's character is revealed, usually in an unflattering light.
In this case, the opening of "Porphyria's Lover" seems that of a conventional love poem. The weather is bad, the lover gloomy, and then the beloved, Porphyria, enters the cottage and the lover's mood shifts to one of happiness at her presence. Although the sense that there are difficulties with the relationship develops relatively early in the poem, we do not get a definitive sense of the speaker's insanity until the lines:
... and all her hair
In one long yellow string I wound
Three times her little throat around,
And strangled her.
In the rest of the poem, the narrator mediates on his dead lover and confirms that he is indeed insane. First, he thinks that she felt no pain while being strangled, something that is obviously impossible. Next, he rearranges her body and describes her as though she is still alive and happy to be with him, seeming almost not to understand that she is really dead. The very act of his spending the night embracing his lover's corpse adds to the impression of insanity.