After a star forms, a leftover ring of dust and gas eventually forms into planets.
http://www.wired.com/