Install the Cheese application, it will download the required software for a webcam, there you can test it, most integrated webcams works right away, now for using it with a messenger would depend on which one you use, I haven't had luck with empathy, but Kopete works fine, I am sure other programs will work fine too.