Can you get a pigs heart transplanted into a human?

Not today. Using animal organs for transplant, xenotransplantation, is a future consideration once the rejection barrier is better understood and controlled. There is ongoing work using porcine organs placed into primates, since they are close to human in tissue structure . An intriguing possibility is genetically engineering donor animals so that they will be less prone to trigger human immune responses.
Yes & No. Hearts from pigs used to be transplanted into some patients years ago but not much anymore. There is too much risk from rejection, the need for a lot more meds than from a human transplant, and potential viral transmission. However, heart valves from pigs & cows are transplanted into some patients (the other type of valve being metal).