Post a picture, tell us where the rock was found and we'll do our best. Here is the deal. Sandstone is just that stone made from sand. It is mostly compacted sand. It is very porous, so many minerals can seep into sandstone. Over time, the great weight required to compact the sand into stone, will also compact those minerals. Some stone is therefore formed in sandstone. Also stone can wash into a sandy bed which can then be covered by more sand and then compacted into sandstone.
Other stones are formed by glacial flow. Called alluvial flow. Water sand mud and other stone form a concretion. A puddingstone is full of silica rich stone forming mostly quartz. If you look you can see other stones within a very hard rock. Sand is basically silica so is quartz. Subjected to fiffering forces they become very different rocks