The Enchanted Castle And Five Children And It by E. Nesbit

A group of spirited children spend their summers plunged into unexpected magic when they encounter a mischievous sand-fairy whose wishes turn out literally and comically wrong and an old, enchanted castle whose charms (including a spell of invisibility) lead them into whimsical adventures; through the resulting mishaps, reconciliations, and discoveries they learn gentle lessons about responsibility, friendship, and the bittersweet edges of growing up.