Quantum mechanics provides a highly accurate description of a wide variety of physical systems. However, a demonstration that quantum mechanics applies equally to macroscopic mechanical systems has been a long-standing challenge, hindered by the difficulty of cooling a mechanical mode to its quantum ground state. The temperatures required are typically far below those attainable with standard cryogenic methods, so significant effort has been devoted to developing alternative cooling techniques. Once in the ground state, quantum-limited measurements must then be demonstrated. Here, using conventional cryogenic refrigeration, we show that we can cool a mechanical mode to its quantum ground state by using a microwave-frequency mechanical oscillator-a 'quantum drum'-coupled to a quantum bit, which is used to measure the quantum state of the resonator. We further show that we can controllably create single quantum excitations (phonons) in the resonator, thus taking the first steps to complete quantum control of a mechanical system.