During their infection cycle, many viruses must package their DNA to almost crystalline densities into a self-assembled compact protein shell. This remarkable process is driven by a molecular motor ˆ a machine-like protein complex that converts chemical energy, in this case, the molecule ATP, into mechanical work. In the last few years, we have used an optical trap to elucidate this poorly understood process, measuring the forces and movements generated by individual DNA packaging motors of the phi29 bacteriophage. With this technique, we have gained a new understanding on how the various components of the motor are coordinated, and how chemical energy from ATP hydrolysis is coupled to mechanical movement of DNA. More recently, we have developed optical trapping techniques capable of resolving displacements at the sub-nanometer scale. This advance has led to the first observation of individual DNA packaging stepping movements, and has further refined our understanding of this complex motor. These findings are not only relevant to other viral packaging systems, but may also provide insight into the mechanisms of a large class of molecular motors that share structural similarities.