a simple rule to tell whether a graph is a function is to pretend to cut it vertically, if any cut intercept the graph twice, it is not a function. otherwise, it is.
In this case, the heart is not a function, because if you cut it up-down direction, your imaginary knife will touch the edge of the heart twice.
I hope this explanation helps.