First of all, what do you want to use it for? For juice, the lemons you find in the supermarket are just fine. Most of them are grown in California (with some from Arizona) and are either the Eureka or Lisbon variety, which are difficult to tell apart, even for a lot of lemon growers. Choose a lemon that's heavy for its size and has a pleasant fragrance. The skin should be bright yellow with no wrinkling. A thinner-skinned lemon will yield more juice, while a thicker-skinned one may be better for zest. Be sure to check that the lemon is not too soft and has no signs of white or green mold. Small blemishes and spots won't affect the juice.
How do I know if lemon is ripe? As long as it isn't rock hard, it's ripe. Since you don't buy a lemon for its sweetness, you don't have to worry about that part.
Small or large? Research indicates that it's usually a better bargain to buy smaller lemons: you get more juice for your money. It means a little more labor on your part, though.