Pick one with no scars, tears, bruises or blemishes in the skin. This is a yellowish oval area formed where the melon was resting on the ground. This is one way farmers tell when the melon is ripe. The spot, especially on green-skinned melons and watermelons, should be yellowish. Inspect the spot where the stem was attached.
Most melons detach from the stem naturally when ripe.
If the stem was cut, it can mean the melon was harvested before it was ripe. Avoid overly soft melons. Try to avoid melons that are stacked on top of one another in stores. Some might have been crushed or cracked. Buy melons whole if possible - cut melons are inevitably less fresh.