There are over three thousand varieties of pear grown across the world, making identification seem nearly impossible. Only a few of these are grown commercially, however, with just a handful of varieties taking up most of the market share. As long as you're familiar with the most common pear types, you should be able to easily determine what kind of pear you're looking at in nearly all situations.
Pay attention to what time of year it is. Different pear varieties are harvested during different seasons, affecting their availability in produce stores. Many are available from September to spring, but Asian and Stark Crimson pears are only sold from August to October, and Bartletts from August to the end of the year.
Look at the shape and color of the pear. Both Bartlett and Anjou pears have red cultivars, but the Anjou is more egg-shaped. Neither pear, however, matches the brilliancy of the Stark Crimson. The nearly-round Green Anjou is differentiated from the similarly-colored Comice by its shape. The distinctive Bosc pear is a fairly common brown shade, but its elegant, thin profile sets it apart from any other variety — while the Forelle's freckles help it stand out from other pears of average shape.
Take a bite. Many pears can be distinguished by their flavor. Bartletts taste the same no matter what the color, as do Anjous. The Seckel is the sweetest of all commercially-grown pears. The Comice, while nearly as sweet, is much juicier. The Bosc has an unusual spicy flavor that prevents confusion with any other variety by taste alone.