During Hollywood’s “Golden Age,” aka Old Hollywood or whatever you wanna call the period of roughly 1930-1960s(ish), major studios made A pictures and B pictures. A pictures had big stars, high budgets, longer running times and would appear as the final act on the theater program. B movies were usually shorter, often “genre” pictures (westerns, noir, sci-fi), much cheaper and ran before the main feature. Some studios, like Republic and Monogram, specialized exclusively in making these cheaper, faster B movies. These studios were known collectively as Poverty Row. At a large studio like MGM, sometimes they would use B pictures to test new actors & if they became popular, they were “promoted” to A pictures—same with directors, etc.
With the collapse of the studio system, the B movie ethos continued with people like Roger Corman, whose American Independent Pictures specialized in sci-fi & horror films and relied on a crop of young talent (Coppola, De Palma) and old actors (Vincent Price). In the 60s & 70s, AIP & exploitation/blaxploitation pictures played to mainly urban audiences & independently owned theaters (now that studios no longer owned theater chains).
The main difference between a B movie and an independent movie is taste. The American independent film movement was/is defined by its adherence to aesthetic quality over material gain, whereas the B movie’s primary goal is profit as quickly & cheaply as possible. This is not to say that all B movies lack quality or that all indies are great, but generally, artistry vs. commercialism is the defining difference.
The independent film movement exploded in the 80s, partly as a reaction to the rise of the Hollywood blockbuster & the multiplex strangling the creative & artistic resurgence Hollywood had undergone in the 70s. Home video also had a huge impact on B movies & indie pictures: a lot of “genre” filmmaking went straight to video/DVD (as did porn) & former exploitation theaters became indie arthouses.
Now of course, B movie aesthetic has been widely adopted into big budget movies and material that was once considered Saturday matinee fodder is winning Oscars and making billions of dollars. With the proliferation of digital & the Internet, pretty much anyone can make a microbudget indie & what we consider “indie” has shifted considerably. Huge movie stars can make indie films and their budgets can be anywhere from $500K to $10M. The spirit of the B movie is kept alive primarily on VOD movies like “Snarknado,” etc.
Hope this helps you better understand the difference between the two!