How does an electrical line tester work

can we use an electrical line tester to check the current and voltage, and how does an electrical line tester work

Mostly an electrical line tester is used to check the voltage, so if we need to check if there is power in the socket then insert the tester in the socket and if there is any presence of power then the LED will glow the tester would use the operator as the ground connection. so there is a resistor in the tester and it will decrease the electric power so the operator will be safe, the resistor which is used will have high resistance mostly 1megha ohm.