Meaning: This sentence is describing the role of the sandcastles in protecting the shore from the waves.
Choice of Words: Sandcastles are structures built out of sand, usually by children. "Guarded" means to protect something, and "shore" is the land at the edge of the ocean. When you put it all together, you get a picture of the sandcastles protecting the shore from the waves.