Entanglement is one of the key resources required for quantum computation, so the experimental creation and measurement of entangled states is of crucial importance for various physical implementations of quantum computers. In superconducting devices, two-qubit entangled states have been demonstrated and used to show violations of Bell's inequality and to implement simple quantum algorithms. Unlike the two-qubit case, where all maximally entangled two-qubit states are equivalent up to local changes of basis, three qubits can be entangled in two fundamentally different ways. These are typified by the states |GHZ>= (|000+ |111>)/ sqrt [2] and |W>= (|001> + |010> + |100>)/ sqrt [3]. Here we demonstrate the operation of three coupled superconducting phase qubits and use them to create and measure |GHZ> and |W>states. The states are fully characterized using quantum state tomography and are shown to satisfy entanglement witnesses, confirming that they are indeed examples of three-qubit entanglement and are not separable into mixtures of two-qubit entanglement.