Use a transformer and an optocoupler. Measure the frequency of the output as 50 or 60 Hz. as appropriate. This will tell you if the AC voltage is there. If you want to measure the actual value you still use the transformer, but add a half-wave rectifier and an A/D converter.
The short answer is: Analog to Digital Converter (ADC).
The long answer is:
1. Arduino uses 5 volt system (Uno) and 3.3 volt system (Due). You have to decide which system you want.
2. 240 VAC is too much for Aruino ADC. If you try to measure 240 VAC with Arduino, you will fry the Arduino. You need circuit to reduce 240 VAC to something that Arduino ADC can safely read.
3. Safety. This website has specific guideline that forbids discussing systems that directly connect to mains voltage sources. Like Papabravo said, you will need another circuit (transformer and some other bits) to separate your mains voltage source (0-240 VAC) from your measuring circuit.