The Grid System
Almost everything Bootstrap does for layout comes back to one idea: every row is divided into 12 equal columns, and you decide how many of those 12 columns each piece of content takes up.
Row and col
A row holds one or more col elements. With no number specified, Bootstrap splits the available columns evenly among however many col elements you put inside the row:
<div class="container">
<div class="row">
<div class="col">One</div>
<div class="col">Two</div>
<div class="col">Three</div>
</div>
</div>
col with no number has no responsive breakpoint of its own.Sizing columns explicitly
Adding a number after col- claims that many of the row's 12 columns, out of the total. The rest of the columns share whatever space is left:
<div class="container">
<div class="row">
<div class="col-8">Main content</div>
<div class="col-4">Sidebar</div>
</div>
</div>
col-8 and col-4 add up to 12, exactly filling the row. If the numbers in a row add up to less than 12, the columns just leave empty space; if they add up to more than 12, the extra columns wrap onto a new line rather than overflowing.
Responsive breakpoints
The real power of the grid is that column sizing can change per screen size. col-md-6 means "take up 6 of 12 columns from the md breakpoint (768px) upward, but stack full-width below that":
<div class="container">
<div class="row">
<div class="col-md-6">Left</div>
<div class="col-md-6">Right</div>
</div>
</div>
Since no explicit class was given for screens narrower than md, Bootstrap falls back to its default of stacking each column at full width — which is exactly the mobile-friendly behavior you want without writing a single media query yourself.