Basic idea is to let water come in from the top hole via a pump in the tank, flow through the filter media and out of bottom hole(s). The filter can either work under pressure together with gravity like the commercial cannister filters or just gravity alone like the normal overhead filters. The latter i prefer as it is easier to maintain and wouldnt be so prone to leakage because you do not have to seal it up entirely.
Secondly make sure the plastic bucket you use is food grade plastic and is brand new so that substances previously stored in it wouldnt leech out.