In the last few years, islamic terrorism has clearly become one of the major security challenges in western countries, especially after the attacks in New York, Madrid and London. This article tackles two main global aims. Firstly, a psychological approach rooted in the study of prejudice and social identity has been applied to analyze and better understand which conditions and factors favor radicalization processes in jihadists groups based in western societies. And secondly, this paper reflects on whether the combination of these processes and ideology has an impact on demagogic legitimation and justification of the terrorist behavior. This analysis explains specific questions about terrorist and their actions. As a conclusion, the article points out that a sensible way forwards is to implement preventive polices based on educational processes. Thus, an improvement of some distorted perceptions among minority groups will be achieved, real integration will be promoted, and the coexistence and respect towards different cultures will be facilitated. These policies will be crucial to prevent radicalization processes and to help diminish the terrorist threat.