Using clomid?? Does it work??

I am 26 yrs old and my husband and I have been TTC for almost 2 yrs now. We haven't had any luck so I am goin to see a fertility specialist . The doc did say something about clomid. But I wanna know does it work and how fast did anyone get pregnant with it.