It means that what you are saying is the truth. Usually kids say it. "Cross your heart?" is the short question to ask the person if he promises he is telling the truth. "Cross my heart" is the statement the person says if he is promising he is telling the truth.
If one kid tells another one a secret, he might say something like, "Do you promise you won't tell anyone?"
"Don't worry. I won't tell anyone."
"Cross your heart?"
"Cross my heart."
There's a longer form: "Cross my heart and hope to die. Stick a needle in my eye." That just means that you are promising something is the truth and if it isn't, bad things will happen to you because you told a lie.