The correct name for these is septarian nodules.
They usually occur in bands in the shale but are also found as 'oneoffs' in it.
As far as I am aware,how they are formed is not fully understood.
Essentially they are made from siderite or iron carbonate.
However within them you may find other minerals.In some cases pyrite which would suggest that these nodules originated as pyrite and then were oxidised to the carbonate.
Other minerals found in them include quartz( both as bands and distinct crystals called herkimer diamonds).
Also calcite, dolomite and in somebcases distinct siderite.
Sometimes the siderite is prefentially removed leaving bands of quartz held together by siderite.
These are called 'beetle stones'.