Resource models are the way models were handled in Magento 1 and are still available in Magento 2. Repositories are the way we are supposed to handle model storage and retrieval in Magento 2, but their use is not consistent.
Resource model way of loading would be something like:
<?php
class SomeClass {
public function __construct(\Magento\Customer\Model\CustomerFactory $customerFactory)
{
$customer = $customerFactory->create();
// load concrete customer instance
$customer->getResourceModel()->load($customer, $someCustomerId);
}
}
repository equivalent would be:
<?php
class SomeClass {
public function __construct(\Magento\Customer\Model\ResourceModel\CustomerRepository $customerRepository)
{
/** @var \Magento\Customer\Model\Data\Customer $customer */
$customer = $customerRepository->getById($someCustomerId);
}
}