As daemonick said, when the engine detects that self (the currently active entity) is touched, it fires the .touch() function, setting other as the touching entity. For example, let's say you fire a rocket against a zombie; Quake eventually will assign self = your rocket and other = zombie, and run the rocket.touch() function, that makes it explode and destroy other by calling T_Damage ().
EDIT: spelling.