This work presents a theoretical study on some aspects of the connection between immigration and social security. The work consists of two parts: The two chapters of Part 1 study an open economy environment, while the third chapter in Part 2 studies a closed economy.