The most important element of a homemade terrarium fogger is a warm air humidifier with a round opening. These can be found at nearly any department store like Walmart or Kmart for under $20. The other things you will need are some aquarium sealant (silicone), a small piece of PVC piping with a diameter big enough to fit snugly inside the humidifier's opening, several diameter-decreasing PVC adapters and some rubber tubing.
The first step is to make an adapter for fitting the humidifier's opening to the rubber tubing. PVC adapters gradually decrease the size of one opening of a PVC pipe (from 3 inches in diameter to 1 inch in diameter, for example). Connect the PVC diameter-decreasing adapters until the diameter of one end is small enough so that an open end of the rubber tubing fits in it snugly. Seal the rubber tubing into the PVC adapter with the aquarium sealant.
Fit the large end of the PVC adapter into the opening of the humidifier. Use duct tape if it's not a perfect fit and fill any gaps with aquarium sealant to prevent any fog from escaping before it gets to the terrarium. Place the free end of the rubber tubing through a hole in your terrarium's lid and dangle it into the enclosure. Most terrarium hoods have special holes for foggers, filters and other accessories. Cut a small hole with a razor blade if it's a screen lid. Fill the humidifier with water, power it on and the terrarium should fill with fog within a few minutes.
Cheaper humidifiers may not have timers and will just keep filling the terrarium with fog until you turn it off. Purchase a light timer from a department or hardware store and place it on the humidifier so that the fogger is only activated at certain times, which is important to reptiles, amphibians or plants that could get stressed out by too much humidity or too much fog. Monitor the temperature of the enclosure after the tank has fogged up to make sure it is still within the acceptable range for whatever you're holding in the enclosure.