The interstellar medium and star formation