Both offenses are starting at their opponent’s 40 yard line (50 yard line is out of bounds). Both offenses are trying to score at the same time. Whichever team scores first, wins. You can only attempt a FG if it’s 4th down.
The refs on one side of the field will have different sounding whistles. That would just be chaos otherwise.