webcam

I want to connect a webcam to my mega2560 so that it can be triggered to take a picture and send it to a sd card. I do not have the cam. yet as I don’t know if this can be done and if so do I need a certain cam to do it. Can anyone help with this?