If the brick cracks, part of the energy goes into breaking the chemical bonds that hold it together. Some of the energy is converted into the sound the brick makes when it hits the floor. Some goes into heating and distorting the floor. But most of the energy is converted into thermal energy. The atoms and molecules that make up the brick are moving about within the brick a bit faster than they were before the brick hit; so the brick and its surroundings, including the floor, grow a tiny bit warmer. Similarly, as gas falls toward the disk surrounding a protostar, gravitational potential energy is converted first to kinetic energy, causing the gas to pick up speed. When the gas hits the disk and stops suddenly, that kinetic energy is turned into thermal energy.