An assimilator is the protoss variation of a building standard to all races. Namely, one that allows the race to harvest vespene gas. It must be built on a vespene geyser and it will eventually run out of gas. In Brood War, when a geyser is depleted, you can harvest gas from it at a much reduced rate. However in Starcraft 2 this mechanic has been changed (but is still subject to change). Once a vespene geyser is depleted you may no longer harvest gas from it.
Protoss buildings and equipment are mostly produced on Aiur and warped to wherever they are needed. Raw materials, however, are still required both for shipment to the Homeworld and the creation of the warp rifts used to bring in new items. Vespene gas is as prized by the Protoss as it is by the Terrans. The Assimilator processes and packages the gas produced at any geyser it is constructed over.