The iPhone can scan QR Codes with the built in rear camera. Some models of iPhone support native scanning of QR Codes, and there are many 3rd party apps that allow QR Code scanning.
iPhones and iPads running iOS 11 or later can scan QR Codes with the native Camera application.
The Camera app provides basic functionality for scanning QR Codes, but does not can other barcode formats. To scan other barcode formats, download the GoToTags iPhone App.