You don’t need to be flexible to begin practicing. The teacher can always show you modifications for certain poses and you can use blocks or straps to help, no matter your level. Good bases (breath, stability, focus, and correct alignment are much more important than being able to put your legs behind your head.) Ashtanga is a dynamic practice and the heat created will help muscles stretch. With a regular practice, little by little you’ll gain flexibility, but also strength and endurance.