Asking for someone? History makes a big difference here. The best thing is to get acquanitance to see provider and get lung and sputum studies. Typically blood is associated with a tumor or infection. There are other causes as well including unusual conditions. None will be helped by continued smoking so help him/her stop. The only way your friend/you can know if there's a life-threatening problem is talk with doctor.
Family physician. It is important that you contact your family physician promptly. There can be many cause of coughing and/or "spitting up" blood. Not all are cancer. However, what you describe is an important symptom that requires prompt evaluation. The best things you can do is openly speak with your family/primary care physician and stop smoking. Your physician can help with stopping smoking.