What gives sapphires their colour?

The blue color of most sapphires is due to trace amounts of elements like iron and titanium within the crystal structure. Other colours are caused by different impurities or structural defects.