In the speech, Mr Cameron drew a clear distinction between Islam the religion and what he described as "Islamist extremism" - a political ideology he said attracted people who feel "rootless" within their own countries.
"We need to be clear: Islamist extremism and Islam are not the same thing," he said.
The government is currently reviewing its policy to prevent violent extremism, known as Prevent, which is a key part of its wider counter-terrorism strategy.
A genuinely liberal country "believes in certain values and actively promotes them", Mr Cameron said.
"Freedom of speech. Freedom of worship. Democracy. The rule of law. Equal rights, regardless of race, sex or sexuality.
"It says to its citizens: This is what defines us as a society. To belong here is to believe these things."