The Role of Thermal Instabilities in Star Formation