Since we know that the raven did not actually put its beak in or on the heart of the main character, it is clear that the expression was figurative, a metaphor used to let the audience understand the author's state of mind using something comparative, but without actually stating that he is comparing. Instead, he asserts that this is what the raven is doing.
This being said, the narrator at this point in the poem is asking the raven to go away. The presence of the raven, to the main character, alludes the memory of his late, beloved Lenore. Therefore, the pain of remembering her is proportional to the bird physically attacking the heart of the suffering man.
He asks that the raven leaves his abode and to never come back.
Leave my loneliness unbroken!—quit the bust above my door!
Take thy beak from out my heart, and take thy form from off my door!"
Quoth the Raven "Nevermore."
This shows that the main character is truly invested in his interaction with the raven and, as he imagines that the raven is there for Lenore, he also shows that it is hard for him to let go of the memory. So, he transfers the blame to the raven, whom he concludes is answering him back saying "Nevermore", which means that he will never leave.
Remember that at the end of the poem, the bird "still is sitting on the placid bust of Pallas". From what can be inferred, the bird (his pain) will never cease.