Generally speaking, binoculars are manufactured in two basic designs in regard to prism assembly and structure. The first is a "porro prism" design which is easily recognized by shape. In a porro prism binocular the eyepiece or ocular lens assembly, is offset from the distal objective lens assembly. In most cases the objective lens will sit outside the eyepiece, although some manufacturers offer compact "reverse porro prism" designs where very small objective lenses nearly touch and are much closer together than the ocular.
I've superimposed the typical shape of a porro prism assembly in red lines above while the green dashed line shows the light path as it travels through the binocular. Note how the light enters the objective lens cell, passes into the upper prism, is reflected 2 times, passes into the lower prism block, bounces two more times and finally exits through the eyepiece.
Roof prism binoculars are quite different in structure and are generally favored for their superior ergonomics. In a roof prism binocular the ocular and objective lenses are lined up in a straight line (not off-set as in porro prism designs). Once again, I've drawn a rough roof prism assembly in red and the dashed, green line represents the path of light travel through the system.
As always, the light enters through the (typically larger) objective lens and travels up to the prism assembly. The assembly (in this case) is compromised of two glass blocks just as in the porro design at top. Unlike the porro however, a roof prism assembly reflects the light 5x. The area where the two blocks meet is called the "interface mirror", and this surface has to both reflect light at points and allow light to pass in others. It is very difficult to accomplish this without losing light through back reflection and/or refraction though, and the angles are more crucial than in simpler porro designs. As such, roof prism binoculars average more expensive than a comparable porro prism.
This higher price adds some very real advantages though to include: superior ergonomics, better waterproofing, and a higher impact resistance (again assuming a comparable level of manufacture and design). Roof prism binoculars generally offer better ergonomics through their slimmer design, as porro prism binoculars average bulkier due to the offset design.
Most porro designs utilize a moving external bridge (see above) that slides the oculars in and out to achieve focus. Once again, this is a simpler and cheaper manufacturing design, however it suffers from one predictable flaw. As these tubes slide over top of one another you are continually wearing the seals that keep moisture out and inert gases in. Over time these will wear to the point of failure leading to moisture problems and internal fogging. In addition this external bridge is very susceptible to impact damage, leading to alignment problems as well.
In most roof prism binoculars the focusing system is internal. In the case of the Leica Ultravid above, internal "field collector lenses" move back and forth between the prism assembly and objective lens cell. Since this system is completely internal it is much more impact resistant, and since you are not constantly wearing the seals through abrasion the roof prism design maintains its water proofing & fog proofing.
As a final note, I need to qualify implications above. I've used words like generally & typically above and also used qualifying statements like, "assuming comparable quality". In most cases in optics the old adage, "You get what you pay for" is true to its word. In looking at binocular prices quickly online, I note full-sized porro prism binoculars (compacts excluded) range from just over $25 up to about $1,200 US. By comparison roof prism prices ranged from about $50 on up to nearly $3,000 US. Assuming less expensive binoculars are created by cutting costs on raw materials (quality of components), manufacturing costs (quality of construction), & labor costs, I certainly expect that a $1,200 dollar porro prism would out-perform a $100 roof prism in every way. However, if we compared the highest quality premium roof prism versus the highest priced porro prism, I'm certain most users would prefer and gravitate toward the roof prism. I say this from my own personal preferences, my experiences of meeting and birding with thousands of birders annually (and noting what binoculars they are using), and from my knowledge of the many independent reviews that have appeared in industry articles in varying popular publications. All suggest roof prism designs are favored across the board by most users.