Rib pain can be caused by gravity impact, intercostal neuritis, costochondritis and other factors, and can be relieved by medication, or surgery. 1. Gravity impact: severe external impact on the chest may lead to rib fracture, resulting in rib pain. In this case, you can perform external chest wall immobilization under the guidance of the doctor, and use drugs such as ibuprofen and celecoxib to relieve the pain symptoms. In case of serious fracture, surgery is needed. 2. Intercostal neuritis: it is a syndrome of intercostal pain due to the damage of thoracic nerve roots or intercostal nerves for different reasons, which can be caused by the degeneration or injury of thoracic vertebrae, tumors, viral infections and other reasons, and the pain is distributed along the intercostal area, which can be nomadic. You can take vitamin B12, ibuprofen, ribavirin and other drugs to relieve the symptoms. 3. Costochondritis: Costochondritis generally refers to the cartilage at the junction of the sternum and the ribs have an inflammatory reaction, clinical symptoms for the anterior chest wall pain, pain can affect more than one rib. This condition can be treated with physical therapy and the use of medications such as ibuprofen and acetaminophen to relieve pain, and if conservative treatment is ineffective, timely surgical treatment is needed. If you have frequent rib pain, you should consult a doctor in time to identify the cause of the disease, choose the appropriate treatment plan under the guidance of the doctor, and take the medication as prescribed by the doctor to avoid adverse consequences.