Thousands of people flocked to the Fife coast to take part in the fun.