I've added physics to my objects but the cloth clips on the cube's edges. Why is that?
The cloth simulation is produced by way of calculating how the points will move over a number of discrete 'steps' each frame. If the steps are too large (and the cloth moving quickly) then it is possible for the cloth to move through a surface before it can be stopped - this is what is occurring in this situation. Once one vertex has moved below the surface of a mesh it can become trapped, unable to break free of the surface, and it can then exert a force that can drag neighbouring vertices below the surface depending on your collision settings.
There are a number of solutions to this problem. The simplest is to increase the number of 'steps' per frame. This will result in reduced motion of the cloth vertices each step, resulting in a much higher chance of it bouncing off the surface rather than passing through. Note that this will also increase the time taken to run the simulation (ie, 50 steps per frame will take 10 times as long to calculate as 5 steps per frame).
Another solution is to amend the Collision properties of the mesh to increase the 'bounds' at which the cloth interacts. The 'Outer' setting sets a boundary on the surface of the mesh which will repel the cloth. With this set too high there will be a noticable gap between the surface and the cloth - although this should not be a problem except with extreme situations or settings. The 'Inner' setting sets the boundary below the surface of the mesh that repels any intersecting cloth vertices back 'out' of the surface. Where possible you should always 'Apply Scale' to the cloth mesh any any mesh it interacts with.
In addition, it can help to increase the subdivision of the cloth mesh to give it more freedom to bend around any colliding surfaces. This will reduce the 'force' of any cloth mesh edges that will be interacting with the surface and reduce the chance of it pushing through the surface. Again, this will affect the time required to run the simulation (and may require even further increase of 'steps' to ensure the finer cloth simulation is processed at a fine enough scale).