How to get model using objectmanager in Magento 2

For getting the model, please use the below code:How to get model using objectmanager in Magento 2

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$model = $objectManager->create('Namespace\Modulename\Model\Modelname');

How to get model using objectmanager in Magento 2expoundsofttechsolution

What is inheritance?