How this sedimentary rock is made?
The rock you show is a conglomerate - it contains a substantial amount of clasts (your pieces) that are gravel or larger size. The pieces have been cemented together into a new rock - kind of like concrete.

There are a couple of additional things that can be seen in your pictures. First the clasts are very angular. This means they haven't been rounded be wave action or transport to the location where the rock formed. It was very likely formed close to where you found it. If you look at the clasts, the grey ones look like the rock to the lower left and the light ones seem similar to the rock to the lower right. This suggests that the conglomerate formed by eroding those rock types followed by cementation very close to the source. Then a new phase of erosion formed the pieces you see.