The sound is produced by brief contact between the shells
In the basic technique, use your fingertip to move the outer shell, the one facing away from your palm, toward the inner shell. Their contact produces the sound. The finger then yields, allowing the shells to separate again. Don't keep pressing, and don't pull the shells apart with your fingers. Keep your fingers gently curved and your thumb steady, without stretching it stiffly backward.
For this exercise, separation is key: one impulse, one audible contact, a return. Different fingers may initially produce sounds of different strength. That's no reason to support the weaker finger by moving your whole arm. A small, repeatable movement is more helpful than a loud, accidental hit. How you gradually increase your practice load becomes important once you train longer sequences.
Castanet playing is especially associated with Spanish stage dance and is also used in some Flamenco choreographies. But it isn't a required part of every Flamenco performance. At the Tablao, with its small Flamenco stage, you can also see dance without castanets. The exercises here isolate finger contact only, without a role, arm movement, or palo-dependent rhythmic pattern.

