Rules live in /etc/logrotate.conf and /etc/logrotate.d/. Common options are daily or weekly, rotate 14 for the number of copies, compress and maxsize. logrotate itself runs daily via cron or a systemd timer.
After a rename, a running service keeps writing to the old file because it holds it open. Either a postrotate script tells the service to reopen its log (e.g. nginx -s reopen), or copytruncate copies the file and empties the original, which can lose a few lines.
If a log keeps growing despite rotation, logrotate -d checks the config. Common causes are wrong paths, missing permissions, or an application log that is not configured at all, such as nextcloud.log.
Example
logrotate -d /etc/logrotate.d/nginx