Marriage, at its heart, is a verbal contract
between two people to wish to join their lives together. For thousands of years (nobility and wealthy families aside) if two people said that they were married - they were. As long as they had said the vows to each other (specific vows varied from culture to culture of course) then that was enough - witnesses would not even be required unless there was an objection to the union (that one half was already married, for instance!). This is where legal issues and governments got involved, so if in doubt a couple of witnesses to the vow would often be handy.
Over time of course, the process became more legislated to the point where it is today. What form it may take in the 24th Century I do not know!