Sound amplifiers heat up, it's normal. The question is whether they're overheating or running as expected. During 2 hours of continuous operation, it's common for them to get hot to the touch, but it shouldn't be so hot that you can't touch the casing without burning your hand. If you can keep your finger on it for a few seconds without pain, it's probably fine.
What I'd check: first, the amplifier's ventilation. Make sure dust, debris, or anything else isn't piling up or blocking the airflow. Many have heat sinks and vents that need air circulation to work properly. Second, confirm the voltage is actually correct - if you got an amp rated for 4 ohms and your tweeters/woofers have a different impedance, the amplifier works harder than it should and heats up a lot more. Third, the gain: sometimes people crank the gain too high on both the amplifier and the head unit at the same time, putting unnecessary stress on the component.
If after fixing all that it keeps heating up like crazy within 2 hours, it could be a defective unit or a power supply problem (too thin a positive cable, weak battery). In that case, better take it to someone who knows their stuff - it's not safe to run a damaged amp connected to your car's battery.