Pig hearts have not yet been used as a successful replacement for a human heart and there are a few reasons for this. Although the pig heart is approximately the same size as a human heart and has the same pumping capacity as a human heart, it is still not a human heart. The human body generally rejects anything foreign that is placed in our bodies. When a human receives a transplant from a human donor, there are many drugs that are used to help the body accept the organ. This happens by suppressing the immune system so that it will not reject the new heart. However, there are scientists who are attempting to genetically modify pigs so that the human body will not attack the donor pig heart.
First to clarify, pig hearts are not used in humans where a transplant is required. There have been a couple of reported attempts to do the same, but they have failed due to the pig's organ being rejected by the human immune system.
Though the pig's heart is very similar in anatomy, function and structure to the human heart it is not a perfect match. Scientists are conducting studies to use stem cell research to make the pig heart totally compatible with that of the human. This will not lead to their being rejected by the immune system and also ensure that they are a perfect fit to the requirements of the human body.