Read every step before progressing; some of the steps point out things you can leave out of previous steps that make life harder. There's not an answer to this question because there's hundreds of barcode scanners and each is used differently.

Step 1 is "purchase a device that can read barcodes". You can use any camera, but I'll save that for a different step later. Until otherwise stated this post assumes you buy a barcode scanner.

Step 2 is "read the manual that came with your barcode scanner." It's possible your vendor already provides .NET support through a DLL. Learn how to use it. This goes smoother if in Step 1 you call the vendor and ask about .NET support; don't spend money on a device if you don't have an example of code that would work. For some reason people love to buy the cheapest piece of hardware they can find from the dodgiest vendor they can find, then get upset when they find out the drivers are horrible or don't work. Spending a week on the phone with a vendor can save you months of trouble; if they don't want to work with you they don't deserve your money.

Step 3 is "follow the instructions in the manual." Most barcode scanner drivers send keyboard input to the system on scan; this is sort of clunky and I'd prefer one with an aqcuisition API but you take what you can get. It's hard to give specific advice here.

If you decide to use a webcam, you need a step 1a: "find/write a library that recognizes and scans barcodes from images". Also, "Make sure you have a way to programmatically get images from your camera." I don't have much experience with this, but the tutorials I'm looking at seem to point to DirectShow as a solution for aquisition.