Prevention depends on the underlying cause of the chest pain. For example, avoiding overexertion can prevent muscle strain. In many cases chest pain cannot be prevented.
The long-term effects are related to the underlying cause of the chest pain. For example, a heart attack may result in heart failure or death. The pain itself may cause discomfort severe enough prevent sleeping and other activities.
Chest pain itself poses no risks to others. However, a person's chest pain may be due to a contagious infection such as pneumonia.