Don't buy it if it does not work or the seller says they donot know if it works or not or has no means of testing it or it is being sold AS IS.
All of these things means it is stuffed in one way or another. Only buy from sellers who have a very good Feedback record (98 to 100%) over many transactions
When you see one you like, find out as much as you can about that type of machine either by talking to dealers, other users and/ or reading on- line reviews (Google) and ask the seller as many questions as you can think of, such as ,Why are you selling, what type of detecting it has been used for, Has it been in water. Have the batteries leaked at some time.
Ask questions on these forums, there is a vast expanse of experienced operators on all of the detecting forums who are only too willing to help in whatever way they can.
Know what type of detecting you will be doing; Beach, Coin/ Jewellery, Relic, underwater or Gold. (certain detectors are better suited to specific types of metal detecting)
Stick to well known brands, tesoro, White's, Garrett, Fisher, Minelab, Bounty Hunter and give the Chinese detectors a very wide berth, some of them sort of work but generally they are crap, these machines can be tempting because of the low price but it is better to stay away from them.