This article tells some about the system to add onto Sincerity's answer. Check it out.
I know how the Mayans collected water but I don't understand how the sand filter they used to filter their water worked?
HI Amber. Great question. Sincerity explained how the sand is able to trap impurities. Rooster chose another good resource.
This visual might help you further understand.