If they had two children called A and B, before the answer to the question they could have been any one of the following:
A = boy B = boy
A = boy B = girl
A = girl B = boy
A = girl B = girl
After the answer, ONLY the first option can be ruled out. Of the remaining 3 options, only 1 of them means that they are both girls. QED.
NOTE: This is the correct and only answer. Probability is the topic that most often causes problems, as it's not always intuitive. There are lots of websites with probability tips and tricks to help you to understand why this answer is correct.