That depends on your distribution. On some system, it's deleted only when booted, others have cronjobs running deleting items older than n hours.
On Debian-like systems: on boot (the rules are defined in
On RedHat-like systems: by age (RHEL6 it was
/etc/cron.daily/tmpwatch; RHEL7 and RedHat-like with systemd it's configured in
/usr/lib/tmpfiles.d/tmp.conf, called by