How robots.txt rules work
A robots.txt file is a plain text file at the root of your domain (for example yourdomain.com/robots.txt). Crawlers fetch it before anything else. If the file says a crawler is not allowed, a well-behaved crawler stops there.
The file is made of groups. Each group starts with one or more User-agent: lines naming crawlers, followed by Allow: and Disallow: rules. User-agent: * applies to every crawler that does not have a group of its own.
When a crawler has its own group, it follows only that group. The two groups do not merge, so you can block everything under * and still allow a named AI crawler in its own group.
Inside a group the most specific rule wins. Allow: /blog/ beats Disallow: / for pages under /blog/, because it is longer. An empty Disallow: line means nothing is disallowed.