How can I round the edges of a mesh?
stacker's answer answers the question. However, you can also selectively bevel parts of your mesh with Ctrl + B which is often faster than using the modifier if you want to bevel certain parts of your mesh (the modifier has options where you can bevel a group of vertices etc). You can also bevel single vertices with CtrlShift + B.
Also see Most efficient way to round edges and How can I make sharp geometric 3d models look more realistic? for more tips.
You can also decide to do it the manual way. Add loop cuts Ctrl + R close to the edges of the cube in all directions (or as needed).
Then apply a subdivision surface modifier Ctrl + 1 - 6
Your answer is ultimately the better solution but one con is that it generates much more geometry than is needed. See http://blender.stackexchange.com/q/811/12