Polar molecules offer a new platform for the simulation of many-body quantum systems with long-range interactions, utilizing the electrostatic interaction between their electric dipole moments and the rich internal structure associated with the molecular rotation. Realizing long-lived, trapped samples of molecules with full quantum control of the molecular internal state is an essential first step towards building such a quantum simulator. In this talk, I will explain how we create ultracold gases of RbCs molecules from a mixed species atomic gas using magnetoassociation on a Feshbach resonance followed by optical transfer using stimulated Raman adiabatic passage. We then use precision microwave spectroscopy of the rotational transition to probe the rich hyperfine structure of the molecule and exploit coherent Rabi oscillations to transfer the total population of molecules between hyperfine levels. We subsequently investigate the AC Stark effect due to the trapping light in low-lying rotational levels and reveal a rich energy structure with many avoided crossings between hyperfine states. Understanding this structure allows us to trap the molecules in a range of internal states and to enhance the rotational coherence through a judicious choice of internal state and intensity. Finally, we study the collisional lifetimes of the trapped molecules for various rotational and hyperfine states, shedding light on the sticky collision issue. As an outlook, I will briefly describe our plans for imaging and addressing of single molecules in ordered arrays as a basis for quantum simulation.