Logrotate is used to automatically rotate, compress, and remove log files. It can be configured to run daily, weekly, or monthly, and also based on log file size. The main configuration file is /etc/logrotate.conf, and individual services are configured in files under /etc/logrotate.d/. Logrotate can be run manually with the logrotate command or automatically via cron. Options allow compressing, emailing, and moving old log files. Scripts can be used for tasks like restarting services after rotation.