Sprinkler systems are used in commercial buildings like offices, malls, hotels, and warehouses according to building codes. They contain sprinklers and a piping system connected to a water source. There are different types of sprinkler systems including wet pipe systems which always have water in the pipes, dry pipe systems used in cold areas to prevent freezing, and deluge systems which activate based on alarms instead of heat sensors and stay open once triggered. Sprinkler systems are designed based on the building contents and are intended to control fires.