Container is a concept to create structure in both your layout and your html page: I had a play with containers before writing this post and below you can see an example how to use it:
<referenceContainer name="content"> <container htmlId="mycontainer" name="mycontainer" htmlTag="ol"> <block name="test" class="Magento\Framework\View\Element\Text"> <arguments> <argument name="text" xsi:type="string"><![CDATA[<li>this is some text</li>]]></argument> </arguments> </block> <block name="testw" class="Magento\Framework\View\Element\Text"> <arguments> <argument name="text" xsi:type="string"><![CDATA[<li>this is some other text</li>]]></argument> </arguments> </block> </container>
As you can see below, the container has no physical ties like a block: the block is having a Block class and a template
To a container, you can assign css class, html id, html tag type (see the example above). The container eventually sits as a html tag in your page and will render all its block and child containers.
Finally, both can be referenced in the layout in the same way and that is possibly where your confusion come from.