Porous organic materials are an emerging class of functional nanostructures with unprecedented properties. Dynamic covalent assembly of small organic building blocks under thermodynamic control is utilized for the intriguingly simple formation of complex molecular architectures in one-pot procedures. In this Review, we aim to analyze the basic design principles that govern the formation of either covalent organic frameworks as crystalline porous polymers or covalent organic cage compounds as shape-persistent molecular objects. Common synthetic procedures and characterization techniques will be discussed as well as more advanced strategies such as postsynthetic modification or self-sorting. When appropriate, comparisons are drawn between polymeric frameworks and discrete organic cages in terms of their underlying properties. Furthermore, we highlight the potential of these materials for applications ranging from gas storage to catalysis and organic electronics.