How to Scan Barcodes or QR Codes? In most cases you could read them with a smartphone, but to make them useful, you’ll need an application or service. Depends who you are and for what you are using the codes.
Specialized Readers
In the cashiers, storages and warehouses you will find specialized barcode readers (pistols and tables). They execute their scanning functionality in the work flow that has barcodes included. They have single, forthright goal and functionality. 
Every day scanning
With the Improvements of Software and the “Smart” Devices, everyone now has in his pocket the hardware to scan these barcodes. Even, Some plain Camera Applications on iOS or Android do the reading on the fly. They do this by displaying the code that is encoded behind, while you are still pointing the camera towards the bars. If for some reason it doesn’t recognize it, there are tons of ready made readers on the app stores:
https://play.google.com/store/apps/details?id=com.google.zxing.client.android&hl=en_US&gl=US
https://play.google.com/store/apps/details?id=com.gamma.scan&hl=en_US&gl=US
https://apps.apple.com/us/app/barcode-reader-for-iphone/id426941562
https://apps.apple.com/us/app/qr-reader-for-iphone/id368494609

Having the Barcodes Reading App for a Service
The thing is, scanning the Bar or QR Code is one thing. Having translated the code to the specific data, loading the specific information is another. In majority of cases, you’ll need a software for the purpose of the bar code. Said as a programmer – you will need the custom Back-End where the code will mean something. In a Previous Article I’ve described a lot of cases where QR and Bar Codes could be used. Here are personal examples of potentially both cases – specific and general.
What You Eat
The What You Eat apps have build in a barcode scanner and it searches in the Web Site’s Database. A simple barcode of a food product expands to – that is written on the labels – beneficial & harmful ingredients + the basic nutrient information. 
Generic QR Code Generator
With the Software Product QR Code Generator, you could encode into a QR Code whatever text you’d like and share it. It is unreadable by humans, but with some of the apps, the information will reveal itself. This is general purpose data encoding. Apply these barcodes in whatever use cases your imagination creates.
For Software Developers
Here are some tools, if you are developer:
On Android Google introduced their own Scanning Library: https://developers.google.com/vision/android/barcodes-overview. It goes way beyond Barcodes. You could also embed within your app a Barcode Scanner. A Second option is to depend on an externally installed Barcode Scanner and grab the code with Intents:
https://github.com/zxing/zxing/wiki/Scanning-Via-Intent
The same library is also ported to iOS: https://github.com/zxingify/zxingify-objc. On iOS in the past I’ve also used pic2code third party barcode scanner that redirects the results of scanning to your web site or app.
In Flutter there are tons of plugins that encode or decode codes.
On a Pure Web – there is work for scanning barcodes, but it does not work always properly and it depends on the latest Web Standards and features – being implemented in the browsers.