The first answer is good, and I have voted for it. The following comments are intended to complement it.
I too have had conversations with people who use this verse to argue against infant baptism. In my case the argument was that baptism required people being taught, therefore baptism was only for people above a certain intellectual level. Of course this is only valid if one brings a prior world view to words such as teaching. Is it not the case that from birth parents teach their children by example, teach them to smile, to say their first words, to take their first wobbly steps? I say this as a reminder to all of us that we need to be careful of our own unconscious belief systems. It is so easy to read our own ideas into a text.
I agree with the exegetical reading in the previous answer. The original Greek has only one command, to make disciples. Then there are three participles, one before the command and two following. A wooden English translation following the Greek word order would look like this:
Going therefore, disciple all the nations, baptising them in the name of the Father and of the Son and of the Holy Spirit, teaching them to keep all that I have commanded you.
If we take the participles as instrumental, which to me seems the natural reading, this is the process by which the command will be fulfilled. We could bring this sense to light with a paraphrase like this:
Jesus said, "… Make disciples of all nations. Do this by
(1) going to the nations;
(2) baptising them in the name of the father, the Son, the Holy Spirit;
(3) teaching them everything I have commanded."
When read this way, to talk about infant baptism completely misses the point. Baptism here has a different focus. It is the nations that are to be baptised. Jesus' words here are to be understood in the sense of bringing in a harvest, an image that he uses elsewhere (see eg Matthew 9.35-38). The harvest of the nations is reaped by going to the nations, by bringing them into the church (baptism) and by teaching them Jesus' commands so they may continue the harvest. Obviously there will be individual baptisms, but how the church carries out those baptisms in particular cases is simply not addressed.
This reading also controls the question of timing. These are generic processes which have a logical order loosely related to chronology. But the more important idea is that all three processes will continue for as long as the church is engaged in mission. As a supporter of infant baptism I think it's possible to create an argument for infant baptism based on the strict chronology of this command. The argument would go like this: We are commanded to baptise, then to teach. Teaching is therefore for those who are already within the church on other grounds. This pattern fits infant baptism, but it doesn't fit believer's baptism in which you have to be taught sufficiently to provide a foundation of understanding for the baptismal response. But again, I'm saying that such an argument would be wrong because chronology is not the main focus of this passage.