The attack early on Friday comes as tensions have reached new heights over Tehran's rapidly advancing nuclear program.
The Board of Governors at the International Atomic Energy Agency for the first time in 20 years on Thursday censured Iran over it not working with inspectors.
Iran immediately announced it would establish a third enrichment site in the country and swap out some centrifuges for more-advanced ones.
Israel for years has warned it will not allow Iran to build a nuclear weapon, something Tehran insists it does not want - though official there have repeatedly warned it could build them.
The US has been preparing for something to happen, already pulling some diplomats from Iraq's capital and offering voluntary evacuations for the families of US troops in the wider Middle East.
US Secretary of State Marco Rubio said Israel took "unilateral action against Iran" and that Israel advised the US that it believed the strikes were necessary for its self-defence.
"We are not involved in strikes against Iran and our top priority is protecting American forces in the region," Rubio said in a statement released by the White House.
Rubio also issued a warning to Iran that it should not target US interests or personnel.
People in Tehran awoke to the sound of the blasts. Both Iran and Israel closed their airspace.
It was not immediately clear what had been hit, though smoke could be rising from Chitgar, a neighbourhood in western Tehran.
There are no known nuclear sites in that area, but it was not immediately clear if anything was happening in the rest of the country.
An Israeli military official says that his country targeted Iranian nuclear sites, without identifying them.
The official spoke to journalists on condition of anonymity to discuss the ongoing operation, which is also targeting military sites.
Benchmark Brent crude spiked on the attack, rising nearly five per cent on the news.
Israeli Defence Minister Israel Katz said that his country carried out the attack, without saying what it targeted.
"In the wake of the state of Israel's preventive attack against Iran, missile and drone attacks against Israel and its civilian population are expected immediately," he said in a statement.
Katz "signed a special order declaring an emergency situation in the home front", the statement said.
"It is essential to listen to instructions from the home front command and authorities to stay in protected areas," it said.
Iran halted flights Friday at Imam Khomeini International Airport outside of Tehran, the country's main airport, Iranian state TV said.
Iran has closed its airspace in the past when launching previous attacks against Israel during the Israel-Hamas war.
As the explosions in Tehran started, President Donald Trump was on the lawn of the White House mingling with members of Congress.
It was unclear if he had been informed but the president continued shaking hands and posing for pictures for several minutes.
Trump earlier said he was urging Israeli Prime Minister Benjamin Netanyahu to hold off from taking action for the time being while the administration negotiated with Iran.
"As long as I think there is a (chance for an) agreement, I don't want them going in because I think it would blow it," Trump told reporters.