Let's think about it this way for a moment
The Raspberry Pi Camera Module connects through the Pi board's dedicated CSI (Camera Serial Interface) port — not an ordinary USB port like a USB webcam. It connects via a ribbon cable, and you need to pay attention to the connector direction (which way the metal contacts face). You'll also need to enable the Camera interface in raspi-config (it's disabled by default). The libcamera-still (photo) and libcamera-vid (video) commands are the built-in tools for controlling the camera module.
Let's connect it to a real scenario
Run libcamera-still -o photo.jpg and it takes a photo and saves it as photo.jpg — from there you can build up to more advanced use cases like a timelapse project (the --timelapse flag) or a motion-detection project (the Python picamera2 library). A security camera project (motion detection + notifications) is a classic use case for the camera module.
Let's look at it together
# Enable camera interface (if not already)
sudo raspi-config
# Interface Options → Camera → Enable
# Take a photo
libcamera-still -o photo.jpg
# Record a 10-second video
libcamera-vid -o video.h264 -t 10000After running libcamera-still, a photo.jpg file should appear in the Pi's home folder, ready to be copied over to your computer with scp.5-minute try-it
If you have a Camera Module, run libcamera-still and copy the resulting photo over to your computer with scp (see the scp lesson from the earlier chapter).
A quick word of caution
Power off the Pi before inserting or removing the ribbon cable — disconnecting/connecting it while powered on can damage the camera module or the Pi board itself.