Bevel
Watch the video or,
Follow the step by step instructions below.
Viewport shading
Enable the Rendered mode in Viewport Shading in the upper-right corner.
Loop of cubes
Build 3 cubes on top of each other.
Go to Edit mode.
Go to Face select.
Select the upper face of the cube.
Press E to extrude and pull the face up. You can also select Face -> Extrude Faces.
Do this again.
Select the upper and lower face on the side.
And extrude these faces twice.
To close the loop we remove the face on top of the lower cube and the lower face of the upper cube.
Select the face on top of the lower cube.
Press X and select Faces from the Delete menu.
Select the lower face of the upper cube.
Press X and select Faces from the Delete menu.
Go to Edge select.
Select opposite edges.
Add a face by pressing F.
Add more faces to close the loop.
Smooth the edges
To smooth the edges you can use the Bevel tool.
Go to Edge select.
Select an edge.
Go to Edge -> Bevel Edges.
Move the mouse to take the edge off.
Scroll with the mouse wheel to make the edge round and smooth.
Select another edge.
Use the Bevel to smoothen the edge.