You can scan a barcode with your iPhone by using a third-party app. Currently, there are no built-in apps that can read barcodes.
You can scan QR codes and documents on your iPad using the Camera and Notes apps. Here's everything you need to know to scan on an iPad.