If you are learning Flamenco you already know ‑ compás is EVERYTHING. If you don't got compás you don't got NADA! And the best way of dominating the compás is by doing palmas, or clapping along to the rhythm.
To begin with Palmas seem like some kind of complicated language that only true Flamencos understand. How do you know when to start? How do you know when to stop? When do you put in off-beats (contra-tiempo) or those cool flourishes? There's no hard and fast rule, professional Palmeros will often choreograph their routines with the group to make sure it emphasizes the other musicians and dancers. The idea is to follow the structure of the music, the phrasing and the accents. So first of all, get listening! After a while you will begin to recognize the chord sequence that the guitarists use to bring a section to an end - it works in a very similar way to how a dancer performs a cierre - listen for it, it's there! Once you begin to recognize these flags you'll feel more comfortable in accompanying the music, and from then on you'll really be able to start playing around with the rhythm.
Although it seems difficult at first, practice makes perfect. So practice! Clap along to every piece of Flamenco music you have. You can even try clapping to non‑Flamenco music (tangos rhythm will usually work for most western tunes!). The more you practice the more it becomes second nature. And if you practice your palmas enough your rhythmicality will improve and, in consequence, so will your dancing. It's a win-win!