A digital camera works by converting photons into electric current using a grid of photodetectors, and adjusting parameters like shutter speed and ISO can produce different results. A simple camera can be built using a pinhole, but it has limitations, and a convex lens can be used to converge light rays and create a sharper image.