It starts at the fireplace and zigzags through the walls up down over or under ending at a termination point on an external wall.
How to add a fireplace to an interior wall.
Direct vent direct vent and power vent fireplaces typically vent out the exterior wall but there are units that can make significant vertical runs which again allows for venting through the roof.
In two story houses choices for placing the fireplace might be more limited but often you can find the 12 to 14 inch space the chimney requires by enclosing a corner of a room or a spare closet.
If you want to add a wood burning fireplace you need space above to get a chimney through the roof.
This type of fireplace can be installed anywhere a chimney can be installed which allows the homeowner to consider installation along an interior wall.