How can I make a square with rounded edges like the one holding the medal to the cloth as shown here:

How can I make a square with rounded edges like the one holding the medal to the cloth as shown here:

Add a Mesh Circle and push verts till you have the basic shape. Extrude so you have a short cylinder. Select All, extrude but don’t move the mouse, hit S to Scale and scale them either inside or out. Tab into Object mode and add a Subsurf modifier.
%<
Did a small video tutorial for you
And also attached is the Blend file of the same. 
Enjoy 
box_with_circular_section.blend (135 KB)