Webcams are cheap. It would be better if you had a webcam for your computer which is separate from your digital camera.
Not all digital cameras can function as a webcam. Only a few of them can. To be sure, check the camera's manual or menu system. If there is no mention about webcam ability, then you can't use your camera as a webcam.
If your digital camera has webcam ability, the manual will explain to you how to do it. Basically, you connect the camera to one of the computer's empty USB slot, turn the camera on, and select "Webcam" functionality from the menu. You may need the camera's CD for installation of the appropriate driver for webcam function to work the first time around. The camera's CD may also contain a webcam application that will allow you to test the camera in webcam mode.
In addition, some Canon Powershot models can be hacked to perform as webcams. Just try searching the internet for the model of your camera, the words "hack" and "webcam".
Now you know!