This is kind of a trick question, because the real answer is, “You should probably leave that to your mechanic.” Shocks and struts aren’t like wiper blades–there’s no surefire way to determine when they’re spent. Accordingly, your first line of defense is taking your car in for an annual suspension inspection. Have a trusted technician thoroughly investigate your shocks and/or struts for signs of failure.
Now, if you’ve been really neglectful on the service front, it’s possible that you’ll notice some symptoms yourself. We mentioned the bouncing: if your car starts to do anything remotely like that, you’ve got serious shock or strut issues. Another symptom can be a hard ride, although that may have more to do with the springs. Finally, if your car suddenly starts swaying at highway speeds or wallowing around corners, that could indicate worn shocks or struts as well. But like we said, the best practice is to be proactive and have your mechanic check things out on a regular basis.