/lib contains libraries, common code shared by applications, for the commands and programs in /bin and /sbin directories. The filenames start with ld and lib. In some distributions exists /lib64 with 64bit version of the libraries, while the 32bit libraries are in /lib.
Kernel modules are also located in /lib directory, especially in /lib/modules/<kernelVersion> . Kernel modules are kernel code that can be loaded and unloaded without re-starting the system, for example device drivers.
/opt directory contains optional software packages
/sys directory contains pseudo-files giving information about the system and hardware. Can be used to alter system paremeters
/srv directory contains site-specific data served by the system
/tmp directory contains temporary files. In some distributions those files deleted while rebooting the system, or may be the directory is a ramdisk in memory