Agent technology offers an interesting computing paradigm: a program is capable of executing —autonomously or in co-operation with other programs— a particular task on behalf of a user. This has offered a new means for the development of complex distributed systems. However, due to its multi-disciplinary nature, most of the approaches in this field are not consistent with each other and are usually difficult to combine. On the other hand, not only the integration of agent platforms developed is a hard task: security is also a crucial issue for the development of agent applications, since without the appropriate methods, the functionality of agent-based systems may be severely affected. This thesis presents a thorough overview on the fundamentals of agent technology, focusing on mobile agent systems, consolidating its main notions and ideas. It also explains the security issues and technical countermeasures associated with mobile agents. Additionally, the most important unsolved issues in both agent technology and security in agent systems are discussed.