How controller loads the layout in magento 2
<p>I have developed a sample module in magento 2 that just prints the hellow world.there is only one controller and one layout file</p>

<p>controller</p>

<pre><code>  &lt;?php
namespace MageClass\First\Controller\Test;

use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\App\Action\Context;

class Helloworld extends \Magento\Framework\App\Action\Action
{

 public function execute()
 {
   $this-&gt;_view-&gt;loadLayout();
   $this-&gt;_view-&gt;renderLayout();
 }
}
</code></pre>

<p>layout file</p>

<pre><code>    &lt;page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"&gt;        
    &lt;referenceBlock name="content"&gt;
        &lt;block 
            template="helloworld.phtml" 
            class="Akhil\Test\Block\Helloworld" 
            name="helloworld_test_helloworld"&gt;
        &lt;/block&gt;
    &lt;/referenceBlock&gt;
&lt;/page&gt;  
</code></pre>

<p>Here my doubt is how this layout and controller is linked .when i accessed controller through browser by default this layout is loading. How it's linking layout and controller.</p>

<p>and i want to add another layout and controller in my module.so how to link these as when accessed the controller load the required layout</p>