38 weeks why am I having period cramps off and on?

Why am I having cramps 38 weeks, 5 days ago I was only 1cm and not effaced.