Related products will pull from the collection(s) the product belongs to, ordered by whatever sequence that collection has been set to display. If the product belongs to multiple collections, it will pull from the first one (alphabetically). In other words, you can configure which collection(s) the product belongs to, but which products are displayed depend on the collection's title and preferred product order.
Related products is now Product recommendations
Atlantic versions after 14.1.0 use Shopify's Product recommendations feature. This is an advanced and smart upgrade from the previous feature, which can use more information to provide more tactical recommendations for your customers.
For more information on this feature, check out the Shopify guide: