After you drag a tool window to an undocked position, you can quickly redock the tool window to the previous location by Double-clicking the titlebar.

Tool Window Titlebar

Also, you may notice some tool windows are in "tool window groups" (as shown in the image below), whereas others are docked individually.  To separate a tool window from its group, either Drag or Double-click the tool window tab away to separate.

Tool Window Tab in a tab group

Technorati tags: VS2005Tip, VS2008Tip