Terrorists are largely motivated by a call to political and social action and the philosophy that displays of violence lead to change that reflects their world view. When some people see social or political injustice, they sometimes turn to terrorism to right the wrongs, whether they have been stripped of their land or had their rights denied to them. They believe that violence will bring them the changes they desire, and that they have no choice but go down that path.
Political and social change on a theoretical level drive many of the terrorist groups that regularly make the news. Groups such as the Animal Liberation Front and the abortion clinic bombers in the 1990s believed so strongly in their causes that the ends justified the means. The Irish Republican Army plagued targets throughout Britain and Northern Ireland in order to try and force the unification of Ireland and to end Britain's rule of Northern Ireland.
It is not an absolute that religious extremism drives terrorism. There are many religious fanatics around the world without a desire to harm others, whatever their cause. Many terrorists transpire to have certain traits, such as narcissistic rage. Mixing that with the conditions they live in, be it in poverty or a colonized society, are more likely to be key factors.