This can be an insult, an expression of pity/sympathy, or even a compliment, depending on the context. As an insult, it can mean a variety of things, ranging from "what an idiot" to "f*** you". In a more sympathetic way, it can mean something to the effect of "I feel bad for you/so-and-so" or "what a shame". As a compliment, it can actually mean "what a sweetheart" or "how cute/sweet". In that sense, it's typically referring to someone's innocence or as a term of endearment.
Examples of "bless your/his/her/their (little) heart(s)" in typical conversation:

Insult (what an idiot):
"His boss told him if he made another careless mistake when filing the data reports again, he'd fire him on the spot. Bless his heart."

Insult (f*** you):
"Hey baby, you've got to be the sexiest little thing here. How about you and I head back to my place and throw our own private party?"
"Bless your little heart. Thanks, but I think I'll pass."

Pity/Sympathy (I feel bad for you/so-and-so):
"Bless her heart, she worked so hard to bake a nice cake for her mom's birthday. But she tripped while carrying it and it was ruined when it fell on the ground."

Pity/Sympathy (what a shame):
"He could have been top of his class, if he hadn't started started skipping class to hang out with those troublemakers. Bless his heart."

Compliment (what a sweetheart):
"I don't know how she finds the time to raise those kids, clean her house, work as a part time substitute teacher, volunteer for church events, and still host occasional social gatherings in her home. Bless her heart, she's a saint!"

Compliment (how cute/sweet):
"Look, mommy! We made macaroni art at school today! Do you like it? I made it just for you."
"Bless your heart, you're so thoughtful. I love it! We'll put this on the fridge for everyone to see!"
by TygraSol February 3, 2018
Get the Bless your/his/her/their (little) heart(s) mug.