The process whereby a newly synthesized protein is directed to its correct location within the cell. Protein targeting is determined by short sequences of amino acids in the protein (known as signal sequences), which direct it to the correct destination; for example to a mitochondrion or (in the case of a plant cell) a chloroplast. This movement can occur either during synthesis of the protein (cotranslational) or after synthesis is complete (post-translational).