Exploring the Early Universe with Gravitational Waves