How to take a picture of the user on click?

I would like to access a camera (either webcam or mobile camera) to take the picture of the user. Who is submitting the form?