Proteins form a very important class of polymers. In spite of major advances in the understanding of polymer science, the protein problem has remained largely unsolved. Here, we show that a polymer chain viewed as a tube not only captures the well-known characteristics of polymers and their phases but also provides a natural explanation for many of the key features of protein behavior. There are two natural length scales associated with a tube subject to compaction -- the thickness of the tube and the range of the attractive interactions. For short tubes, when these length scales become comparable, one obtains marginally compact structures, which are relatively few in number compared to those in the generic compact phase of polymers. The motifs associated with the structures in this new phase include helices, hairpins and sheets. We suggest that Nature has selected this phase for the structures of proteins because of its many advantages including the few candidate strucures, the ability to squeeze the water out from the hydrophobic core and the flexibility and versatility associated with being marginally compact. Our results provide a framework for understanding the common features of all proteins.