Meaning
to memorize something completely
Literal Meaning
from the heart; with deep knowledge
Example
“He knows the poem by heart and can recite it perfectly.”