In a 9 hole tourny, it will be decided by who had a better score on the last 6 holes, if those are the same, then the last 3, then the last hole.
If it's an 18 hole tourny, then it's the last 9, if those are tied, then it will just keep going back until a "better hole" between the players is found.
If all of these are exactly the same, then is simply comes down to who posted the round 1st.