An attached pergola is affixed to a building, often extending from the house, creating a seamless indoor-outdoor transition. In contrast, a detached or freestanding pergola stands independently, placed anywhere in the outdoor space, offering more flexibility in design and location.