I don't recommend using a fogger in a glass tank as too much humidity and the stagnant air created by lack of air flow in a glass tank can cause respiratory infections.
They work by ultrasonic vibrations turning water into fine particles, then a fan blows it through a tub into your enclosure. You can run the tube anywhere into your enclosure.
No its not used to replace misting, just to increase humidity for chameleons that require high amounts of humidity.