A trap is a transfer of control from the running program to the kernel, made by the processor itself in the middle of an instruction stream. It is caused either by the instruction being executed, a hardware exception (an illegal instruction, a load from an address that faults, a system call), or by an event outside the program, an interrupt (a device has data, a timer has expired). The interrupt vector is the address, or table of addresses, the processor jumps to on a trap. A timer interrupt is an interrupt raised when a clock reaches a value the kernel set.
ecall.