Overcooked shrimp turns tough and/or rubbery. You can watch your shrimp carefully to avoid overcooking. Generally, when shrimp turns opaque with pink and red accents, they're done. Stop the cooking process immediately. Shrimp also tend to curl as they cook -- stop the cooking process when they are beginning to curl into a C shape, but before they curl tightly. You can also use an instant-read thermometer to test doneness. Shoot for an internal temperature of 145°F or 63°C.  Lastly, you can drop boiled shrimp into an ice bath to halt cooking immediately. Do this to minimize damage if you're worried you cooked them too long.