How a subdomain works
You create a subdomain with a DNS record for a domain you already own, and that record can point to a different server from your main site. That's why a shop, a help centre or a blog run by another company's software often sits on one: help.example.com can be served by a help-desk tool while example.com runs on your CMS. www is a subdomain too.
Subdomain or subfolder for SEO?
Google's documentation doesn't say one ranks better. What it documents is how they're handled. A robots.txt file only applies to the host it sits on, so blog.example.com needs its own. In Search Console, a URL-prefix property covers one host, while a Domain property covers every subdomain. Google's guide to multi-regional sites lists subdomains as easy to set up and able to run on different servers, and subfolders as easy to set up and low maintenance because they share one host.
In practice, a subfolder such as example.com/blog is the simpler choice when the content runs on the same platform as the main site. A subdomain earns its place when it has to run on a different system.
What each subdomain needs
If you do use one, set it up like a site of its own:
- Its own robots.txt at its root.
- A sitemap of its pages, submitted in Search Console.
- A Domain property in Search Console, or a URL-prefix property for each subdomain.
- Links from the main site to it, and back, so Google finds it.