For a basic yes/no question, both أَفَهِمْتَ الدَّرْسَ؟ and هَلْ فَهِمْتَ الدَّرْسَ؟ are possible.
Opening interactive controls...
Basic Yes/No Use
The Two Interrogative Particles: Hamza and Hal
For a basic yes/no question, both أَفَهِمْتَ الدَّرْسَ؟ and هَلْ فَهِمْتَ الدَّرْسَ؟ are possible.