Pain During Sex?

Does this happen to anyone? What might be causing this. It doesn't hurt when we have sex most of the time. Just out of no where it will start hurting then the next time we have sex it doesn't. Happens like once ever 2 weeks there's a day where during sex it hurts. But the rest of the days we have sex it's completely fine and doesn't hurt at all.?