To vent moistures and keep air moving in the roofs and attics.
You won't see it until you get in the attic beween ceiling and roof.
They are automatic, the hot/cold air movement keeps them moving (that's why you see most of the time, they have curves on the side).