How long a tire lasts depends on a number of factors, including what type of tires you ride, how much you weigh, the conditions you ride in, front vs rear tire, etc. In general, a good set of tires will last a couple thousand miles.
When the tire is totally worn out, you can usually see threads beneath the rubber in places. Alternatively, the tire may start to bulge in spots. In practice, road tires rarely get to this point. Much more commonly, they start accumulating a lot of cuts from glass and other debris in the road. When you start getting disproportionately many flats, it's a good idea to replace the tire (you can use the tire longer, but you'll probably waste more than a new tire's cost in tubes).