What is the difference between thoracic surgery and heart surgery?

Organs. Cardiac surgery involves the heart and great vessels. Thoracic surgery involves the lungs, chest wall, esophagus, and great vessels. Cardiac surgeons are also thoracic trained, but not all thoracic surgeons are cardiac trained.
Can be different. Heart surgery is surgery of the heart and great blood vessels thoracic surgery is surgery of the heart and everything in the chest general thoracic surgery is surgery of everything in the chest except the heart and great blood vessels.
Definitions. Thoracic surgery is any surgery in your chest. Common examples are surgery on the lungs, heart or esophagus. Heart surgery is, of course, confined to the heart. All heart surgeons are thoracic surgeons.
Term use. Thoracic surgeons operate on the chest and the organs within: heart, lungs, esophagus, chest wall. You may also find a common title of "cardiothoracic surgeon" or in more specialized regions a distinction will be made between heart surgeons and non-heart surgeons, i.e. "cardiovascular surgeons" vs "thoracic surgeons".

Related Questions

Where begins and where ends sternotomy scar on chest after heart surgery and what length is this scar? How long takes complete heal of this scar?

6 inches roughly. Begins just below collar bone and ends just above xyphoid process. Roughly6 inches long. Takes 8 weeks to get strong but over a year to completely heal.
2-3 months. Scar usually from sternal notch to upper abdomen.
Depends. Usually the incision is a few inches shorter than the breastbone that is divided for the operation. The incision is pretty well healed after a few weeks, but the scar remodels for months.

I am waiting for heart surgery to replace a valve. Having chest pain and I just took my BP and it was 125/106. Took BP several times. Cause for this?

Narrow pulse pressur. This implies an elevated peripheral vascular resistance with a relatively preserved stroke volume.
Pain. With pain and anxiety, BP may rise. The diastolic number is clearly too high if accurate. Repeat both arms and call your doc if correct.