Target has a number of algorithms that are used to determine the order in which items will appear. Some of these algorithms use a co-occurrence model, i.e. "people who viewed Product A also viewed Product B x number of times".
Another algorithm uses a content similarity model that uses Jaccard similarity to determine the proximity of two items in the catalogue. This algorithm evaluates the metadata for each item; ultimately, the items that have the most overlap of keywords will be recommended together. Check out this article in our documentation for more details on the other algorithms you can choose from.