Hi,
a trap is an SNMP message, sent via SNMP protocol using UDP destination port 162 (by default). A Syslog message is message sent via Syslog protocoll using UDP desitnation port 514 (by default).
SNMP was developed for network management, Syslog was developed for Unix-like systems.
While Syslog uses text messages that are supposed to be easily read by humans, SNMP traps use structured binary data that needs to be translated to human readable form based on a formal definition (MIB).
That said, both are used for the purpose of sending information regarding some kind of event to a central server.
Thanks,
Erik