Oh, combinatorics tasks are gorgeous for mind.
To calculate this amount yoou have to follow several steps.
First of all you have to find out the amount of possible combinations in choice of first 6 people. It would be the number 12C6.
Next goes the choice of three people into the group, which is 6C3.
Final calculation would be like
You need to divide the number by three, for there should be three groups of students once you finish.
Hope it helps!