It's not hard to keep a small point-and-shoot camera or cell phone protected from sand and spray. While there are many protective carrying cases on the market designed for such circumstances, you don't need to blow the bank on one if the budget's tight. The same plastic lunch bags you use for packing sandwiches can help you protect your gear. Just go with the kind that can be zipped closed and seal your camera or phone inside two of them (three if you're going out on the water).
If you're working with a dSLR, things get a bit more challenging, but not impossible. Keeping the camera in a closed camera bag will do the job of protecting it from spray and sand until you're ready to use it. Minimizing the time the camera is exposed to the elements helps, but you can further protect it by shooting with it inside a plastic bag or camera raincoat. A protective case such as the Camera Armor can help, but not completely protect your gear. (Sand and grit can work their way inside these coverings but they do make it harder for them to reach the camera body and reduce the amount that get through.)
Keep a microfiber cloth with you that you can use to wipe your camera body and lens down as soon as you're done with your day at the beach.