Deep underground, some red siliceous siltstone became fractured, most probably in a fault, leaving gaps between the fragments. Later, the gaps had quartz deposited in them, forming the rock we see today.
But it wasn't until millions of years later, that the rock came to the surface of the land (due to uplift and weathering), and eventually ended up rounded by water action in a river bed and/or on a beach.
Quartz comes in a wide range of colours and opacities...
Try scratching an old beer bottle with it and vice versa. If the stone scratches the glass, it is harder, and hence probably quartz.
There are other minerals that are harder than glass and look similar to quartz (especially in rounded pebbles, where aspects of the crystallography are not apparent), but quartz is by far the most abundant.