We discuss the different nature of the gauge theories on a D-brane or a stack of D-branes, in type II superstring theory, as follows from the Freed-Witten anomaly. Usually on a D-brane world-volume there is a standard gauge theory, described by the A-field thought of as a connection on a complex vector bundle. Actually, this is a particular case, even if it is the most common one. In order to get a complete picture, within the framework provided by the geometry of gerbes with connection, it is necessary to give a joint geometrical description of the A-field and the B-field, via the language of tech hypercohomology. The Freed-Witten anomaly, which is a global world-sheet anomaly, imposes some constraints on such fields: we will show for each case what is the nature of the corresponding gauge theory on the D-brane or stack of D-branes.