Whether or not you can use the hardware to write protect a USB drive depends on the device itself. Many current makes and models of USB drives have a small switch or slider on them. This type of switch may be on either the face or the side of a USB drive, and will have only two options, such as Locked or Unlocked - which may be depicted as graphics of a locked padlock and an open padlock - or perhaps On and Off. These switches can be minuscule, so if you do not see one right away, don't assume it just is not there. Rub the tip of your index finger all along every side of the USB drive. Take off the cap and check the covered area of the USB drive as well.
If you find a switch, simply slide it to the Locked position to secure USB drive instantly. When you want to be able to add to it or make changes, all you need to do is slide the switch back to the Unlocked position.
However, some USB drive models, such as the less expensive types given away in bulk at conventions or as promotions, may not have a write protect switch at all. In this case, you will need to use software in order to write protect these USB drives.

click to enlarge