Period sex

Is having sec on your period safe? And what happens if you do?