What does "resistor as a reference" means?
In very simple terms, the piezo transducer can give out highish voltages when subject to vibrations. The piezo transducer has extremely high internal resistance - you can try to measure it on the highest range of your multimeter ohms range - so the current it can give out is very low. As a result we call this a "high-impedance source". (Impedance can be thought of as resistance to current flow.)

Your microcontroller analog input has an input range of 0 to 5 V DC and to get best use of this our signal into it should be in that range of voltages. A 0 to 0.5 V signal, for example, would only use 1/10 of the range of the ADC (analog to digital converter) and for your microcontroller I think that would give you 102 possible values out of 1024.

To maximise the voltage from your weak transducer you need to feed the small current into a high value resistor. With the 1 M&Omega; value in your circuit we can see from Ohm's Law that you will reach 5 V when the current from the transducer is \$ I = \frac {V}{R} = \frac {5}{1M} = 5 \ \mu \text A \$.

The design of the circuit isn't great. The transducer may give out negative voltages or voltages higher than 5 V and they are relying on the microcontroller's internal protection diodes to prevent damage to the IC. A commercial design would be likely to include external protection.




  You'll need to plug in high value resistor (like 1-megaohm) as reference to ground for this to work well.


I think we've covered this. The resistor converts the current from the transducer to a voltage for the microcontroller.


  Lower resistor values will make the piezo less sensitive to vibrations.


We've covered this. A lower value resistor will result in a lower voltage for a given current from the transducer.


  What does "resistor as a reference" means? 


It is a poor choice of words. It is really a "load" for the piezo to convert current to voltage.


  And why would the piezo be less sensitive with less value resistors?


Explained above.


  Resistors are one of the most confusing things for me.


Resistors can be used to limit current in a circuit, decrease the voltage or to convert current into voltage. Keep up your studies and you will start to see where they are used and why as you read more circuits.