Time is the key factor to getting drugs out of your system. Drinking fluids can only help you in certain cases like alcohol consumption.
Marijuana for habitual users can take a month to be out of the system.
Non habitual users it takes about 7 days. (speaking if you do it once a month)
Pills containing amphetamines and opiates take about 2-7 days depending on dosage and what you've taken.