The US has attacked Iran, with explosions reported in multiple areas and heightened alert across the Middle East.