Painful sex

The last couple times my husband and I have tried to have sex, we haven’t been able to because it burns so bad. Has anyone else experienced this? Is there anything I can do to help it?