Nifedipine is primarily used to treat conditions such as high blood pressure (hypertension) and certain types of chest pain (angina). It works by relaxing and widening the blood vessels, which helps to improve blood flow and lower blood pressure. In the case of angina, it can also reduce the workload of the heart, thus relieving chest pain.