To make a water filter, you can use anything that has sides and a top and bottom. A 2 liter pop bottle works good. If all you have is a smaller bottle that would work too. It will just be smaller and you might have to run the water through more. Cut the bottom of the bottle off, now holding it with the neck down, start building your filter. You can also use a hollowed out log, rolled up bark, or whatever else you can make a tube out of. If your using bark, (birch bark would be good) your going to need either roots or strands of inner bark to hold everything together. (Part 1) Holding your unit vertical, your going to first put grass or fabric (or whatever else you have to work with) in first. Tamp this down as much as you can, especially if your using a solid type tube. When you pick the unit up, you don't want your material to fall out the other end. Let's say your tube is about 16 inches long, your going to want about 3 inches of packed material in first. (Part 2) Your then going to put about 3 inches of sand and pack this down too. (Part 3) Next your going to put in about 4 inches of charcoal. Not ashes but black charcoal and your going to pound this in so that it's like powder. (Part4) Your now going to pack another 3 inches of sand on top of the charcoal. (Part5) Now fill the remainder with grass or fabric or what have you. If your using a tube and the material starts coming out of the bottom, either wedge in some twigs or rocks across the inside of the bottom to hold the material in. If your using a bottle, just figure out the proportions according to the length your working with.
Once it is completed, water is slowly poured in from the top and allowed to flow down through. The first few gallons of water that go through will be a bit murky. Toss these, and keep pouring... it will clear right up.
Footnote: Viruses are typically not an issue in water sources unless you are traveling into tropical regions. Most viruses found in the waters of N. America are bacteriophages. They are dangerous to bacteria such as Cryptosporidium, Giardia and other single cell protozoa.... which are the critters you're trying to get rid of anyways. My point is that, if the charcoal layer is properly packed, this should trap the stuff you're primarily concerned about. In other areas, you will filter and then BOIL the water. This will take care of the murkiness, taste, etc and then the boiling will get the rest.
Here are a couple of pictures of survival water filters.