The phrase in the title appears, I believe, just twice in Tanach. Literally it means to "return [something] to your heart". "Heart" in Tanach typically refers to your personality/identity/self - including both emotions, which our culture identifies with the heart, and thoughts. Since thoughts and emotions normally come out from the heart, to "return them to the heart" means to remind and convince yourself of them - to internalize them. Perhaps a more poetic translation would be "to take them to heart".
This meaning is clear from the first occurrence of the phrase, in Devarim 4:39-40, which is well known to us from the Aleinu prayer:
וידעת היום, והשבת אל לבבך, כי ה' הוא האלקים בשמים ממעל ועל הארץ מתחת, אין עוד. ושמרת את חקיו ואת מצותיו, אשר אנכי מצוך היום, אשר ייטב לך...
We are supposed to internalize the fact that our God is the only god, and this knowledge will motivate us to keep the commandments.
The second occurrence (Devarim 30:1-2) is harder to understand.
והיה כי יבאו עליך כל-הדברים האלה, הברכה והקללה אשר נתתי לפניך, והשבת אל-לבבך, בכל-הגוים אשר הדיחך ה' אלהיך שמה. ושבת עד ה' אלקיך, ושמעת בקלו...
When the blessing (of reward when we obey God) and curse (of punishment when we disobey) come to pass, we should take to heart... what? The verse does not say what we should take to heart!
I think the answer is that we should take "it" to heart - with "it" being the content of the previous phrase. We should take THE COMING TO PASS OF THE BLESSINGS AND CURSES to heart. We realize that God in fact rewards and punishes, and that is a motivation for us to repent.
If that is the meaning, then how does the grammar work out?
Perhaps the phrase is intentionally incomplete for reasons of conciseness. It should say "take ____ to heart", but because here the phrase "____" is so long, it is omitted and the listener is supposed to figure it out and insert it mentally.
Or perhaps "take to heart", without a subject, means to take to heart whatever is natural to take to heart in the circumstances. If at some point in your life, you are confronted by direct evidence of God's control of the world, that awareness can be enough to drastically reorient a life which has been based on the proposition that God is irrelevant to the world's functioning and to our behavior.