Whenever you run a load of laundry through your dryer, there is about a gallon worth of water that is released as steam from its vent. This is part of its natural operation, but it means that it is important to have the air vented to the outside, because otherwise that moist air can do a lot of damage to your home. For example, it could collect and cause mold or water damage in places that you might not even realize.
Your dryer should vent through a straight duct, since sharp turns could lead to collections of lint that could pose a fire hazard. You should also make sure that the exhaust vents outside at least 3 feet away from a door and 10 feet away from an air conditioner unit.
You should never make use of a device that vents the air back inside your home. While these might seem convenient if you don’t have an exhaust to the outside, it will dump all that humidity inside your home.