All devices obtained on contract come with warranties. The handset manufacturer usually carries the warranty for the first year (except Nokia who hold the warranty for the full 2 years). Vodacom and MTN carry warranties for the 2nd year, whereas Cell C does not do this.
Warranties generally cover defects in the handset. It specifically does not cover physical damage, including water damage. To safeguard against this, it's best to look at insurance.
In very rare circumstances, a brand new device may not work (or works improperly) from the first day it is received. Under certain circumstances, these out of box failures are covered by manufacturers.
Laptop and tablet warranties vary depending on the manufacturer.