Tehran has already said it will take legal, political and reciprocal measures in response to Trump's order suspending the entry of people from Iran and six other Muslim-majority countries.
Rouhani turned the focus on Trump himself in a live address on state television, saying: "He (Trump) is new to politics. He has been in a different world. It's a totally new environment to him."
"It will take him a long time and will cost the United States a lot, until he learns what is happening in the world," added Rouhani, who led a rapprochement with Washington under Trump's predecessor Barack Obama.
Trump's has said his travel order, signed on Friday, is needed to protect national security.