On taxes, Romney said he's "not looking to cut taxes for wealthy people."
"The top 5 percent will continue to pay 60 percent [of taxes] as they do today," Romney said.
"I am looking to bring down taxes for middle-income people."
Obama responded by saying Romney's tax cuts would cost $5 trillion in addition to his wanting to add $2 trillion in military spending and $1 trillion by extending the George W. Bush-era tax cuts for the wealthiest Americans. The few loopholes Romney has said he would close, Obama said, won't plug that hole.
"We haven't heard from the governor any specifics beyond Big Bird and eliminating funding for Planned Parenthood, in terms of how he pays for that. ... That's a sketchy deal," Obama said.
The two also sparred on immigration policy, with Romney hitting Obama for failing to follow through with his promise four years ago to introduce reform legislation in his first year in office. He said he does not favor booting undocumented immigrants en masse.
"We're not going to round up 12 million people," Romney said, advocating self-deportation in which "if they find they can't get the benefits they want, the jobs they want, they'll go someplace where they find better opportunities."
Obama placed the blame for the lack of immigration reform on Republicans.
"We have not seen Republicans serious about this issue at all," Obama said. "It's time for them to get serious about it."
Obama criticized Romney for trying to make political hay over the deaths of four Americans in the attack on the U.S. Consulate in Benghazi, Libya, and said "everyone will be held accountable" once investigations into the incident are completed.
Romney said he found it "troubling" that Obama attended campaign fundraising events in the days after the attack, which he cited as a sign Obama's foreign policy of "leading from behind" was "unraveling before our eyes."
But Obama bristled when Romney suggested he was more interested in his campaign than the Americans serving overseas. Obama said he found it "offensive" that he or anyone in his administration would "play politics" or mislead about what happened in Benghazi.
"That's not what I do as president. That's not what I do as commander in chief," Obama said.
Early on in the debate, Romney came out jabbing with his five-point plan, which he said would rebuild the economy and create 12 million jobs in four years. Obama counter-punched, saying the former Massachusetts governor has "a one-point plant."
"That plan is to make sure the folks at the top play with a different set of rules," the Democratic incumbent said.
Obama said Romney's plan follows past Republican policies that have led to shipping jobs and investment overseas.
"That's exactly the philosophy that was in place the past decade," Obama said. "We've fought back for four years to get out of that mess."
When it came to a question about energy policy, the two political combatants really started slugging.
Obama said his administration has increased domestic oil and gas production, but he also wants to do it "in an environmentally sound way."
Romney's plan, he said, "is to let the oil companies write the energy policies."
"He has the oil and gas part, but he doesn't have the clean energy part," Obama said.
Romney countered by asserting oil production is down 14 percent and natural gas production is down 9 percent. Obama said that isn't true.
"I believe very much in our renewable energy capabilities," Romney said, but added the country doesn't need a president who is not "Mr. Oil, Mr. Gas or Mr. Coal."
"Getting us to energy independence within eight years, you're going to see manufacturing jobs coming back," Romney said, adding if he is elected there will be "more drilling, more permits and licenses and we're going to bring that pipeline in from Canada."
Obama laid into Romney on coal, saying: "When you were governor of Massachusetts, you stood in front of a coal plant and said this plant kills, and took great pride in shutting it down, and now all of a sudden you're a big champion of coal."
Romney said he would have "a very aggressive energy policy," saying, "I don't think anyone thinks you will be someone to push for oil, for gas, for coal."
The debate, at a 5,000-seat sports and exhibition complex at Hofstra University in Hempstead, N.Y., near New York City, was a "town meeting" format moderated by CNN "State of the Union" host Candy Crowley.
Romney was generally seen as having handily bested Obama in their first confrontation two weeks earlier in Denver. The president's handlers worked to ensure there wasn't a repeat.
Obama planned to be respectful but firm in the debate, spokeswoman Jen Psaki said ahead of the second meeting.
"You should expect that he's going to be firm but respectful in correcting the record and the times we expect Mitt Romney will hide from and distort his own policies," Psaki told reporters Monday.
"He's energized and I expect he will also be making a passionate case."
A United Press International poll Monday indicated Romney had a 3 percentage-point lead over Obama, with 49 percent of likely voters saying they would vote for Romney and 46 percent saying they favored Obama.
A Washington Post poll Monday found the number of supporters who back Romney "very enthusiastically" doubled after the debate, with 62 percent of likely voters backing Romney saying they now back him intensely.
Psaki declined to offer details about Obama's practice sessions, explaining the president was "calm and energized and looking forward to getting to New York."
The White House said Obama planned to share a steak dinner with first lady Michelle Obama prior to the debate.
Romney prepared for the debate by working on body language and stylistic changes to maximize the more informal feel of a town-hall style format, The Washington Times reported.
"What the governor has to do and what he will do is be exactly who he was at the last debate -- be himself," conservative commentator Bay Buchanan, U.S. treasurer under President Ronald Reagan, said on the CBS News program "Face the Nation" Sunday.
Both candidates had expressed concerns Crowley promised to ask follow-up questions if she thinks it's appropriate, rather than simply let the audience members ask questions. Both campaigns complained to the Commission on Presidential Debates, which issued a clarification that no changes had been made to the debate format. Politico said a Fox News report that said Crowley would ask follow-up questions was wrong.
The commission said in a statement to Politico there has been no change to the planned format.
The third and final debate, Oct. 22, is to take place at a 750-seat performing arts center at Lynn University in Boca Raton, Fla. It is expected to focus on foreign policy and be moderated by CBS News "Face the Nation" host Bob Schieffer.
Kilauea lava prompts evacuation notice in Hawaii