How to use make a capacitive sensor with arduino

For this you need the library capacitiveSensor. You will find it inside the top menu Sketch/Include library/manage library/…

To connect your sensor to arduino

Which resistor to use
Use a 1 megohm resistor (or less maybe) for absolute touch to activate.
With a 10 megohm resistor the sensor will start to respond 10-15 centimeters away.
With a 40 megohm resistor the sensor will start to respond 30-60 centimeters away (dependent on the foil size). Common resistor sizes usually end at 10 megohm so you may have to solder four 10 megohm resistors end to end.
One tradeoff with larger resistors is that the sensor’s increased sensitivity means that it is slower. Also if the sensor is exposed metal, it is possible that the send pin will never be able to force a change in the receive (sensor) pin, and the sensor will timeout.
Also experiment with small capacitors (100 pF – .01 uF) to ground, on the sense pin. They improve stability of the sensor.