In this work, quantum molecular dynamics simulations (QMD) are preformed to study the hydrogen molecules in three types of carbon nanostructures, $C_{60}$ fullerene, (5,5) and (9,0) carbon nanotubes and graphene layers. Interactions between hydrogen and the nanostructures is of importance to understand hydrogen storage for the development of hydrogen economy. The QMD method overcomes the difficulties with empirical interatomic potentials to model the interaction among hydrogen and carbon atoms in the confined geometry. In QMD, the interatomic forces are calculated by solving the Schrodinger's equation with the density functional theory (DFT) formulation, and the positions of the atomic nucleus are calculated with the Newton's second law in accordance with the Born-Oppenheimer approximation. It is found that the number of hydrogen atoms that is less than 58 can be stored in the $C_{60}$ fullerene. With larger carbon fullerenes, more hydrogen may be stored. For hydrogen molecules passing though the fullerene, a particular orientation is required to obtain least energy barrier. For carbon nanotubes and graphene, adsorption may adhere hydrogen atoms to carbon atoms. In addition, hydrogen molecules can also be stored inside the nanotubes or between the adjacent layers in graphite, multi-layer graphene.