Scanning probe microscopy (SPM), including scanning tunneling microscopy (STM) and atomic force microscopy (AFM), has become a powerful tool in building nanoscale structures required by modern industry. In this article, the use of SPM for the manipulation of atoms and molecules for patterning nanostructures for opt-electronic and biomedical applications is reviewed. The principles and procedures of manipulation using STM and AFM-based technologies are presented with an emphasis on their ability to create a wide variety of nanostructures for different applications. The interaction among the atoms/molecules, surface, and tip are discussed. The approaches for positioning the atom/molecule from and to the desired locations and for precisely controlling its movement are elaborated for each specific manipulation technique. As an AFM-based technique, the dip-pen nanolithography is also included. Finally, concluding remarks on technological improvement and future research is provided.