Anarchists have used the black flag as a symbol at least since the early 1880’s. The origin of the symbol is not clear, but it was adopted and bonded to anarchism during the latter half of the 19th century. Some claim it has its origin in the use of black flags by pirates, which ships were navigated over the seven seas through the work of free men and the captain usually elected and subject to instant recall. Pirates were also thoroughly hated by the ruling class(es) and the pirate symbol due to these circumstances to some extent embodied the spirit of lawlessness and rebellion to the oppressive hierarchies of “society.”
But the black flag is also a symbol negating all other symbols. The color black is a non-color or anti-color swallowing all other. The black flag supposedly “negates all borders” and symbolizes the final abolishment of the state and everything connected with its rule. It also represents the anarchists’ allegiance to nothing, and the plain black is therefore the total void of allegiance.
The black color and the black flag as a symbol are closely related to the misery of mankind under rule. It is claimed the color of black symbolizes dried blood and is therefore closely related to the bloodshed of oppressive rule or the rebellion, and the suffering, hunger, misery and death of the ruled masses. The dried blood may also represent the helplessness, and in time: apathy, of people under rule, who are forced to watch their liberties, family and friends be slaughtered by the tyrant(s). It symbolizes that the time of tyranny and oppression is to be ended, and that the rebellion against the oppressive rule will not stop, its rebels will not surrender nor be merciful. “Liberty or Death.” “Surrender or die!”
The difference between the black flag and other political symbols, except for the color, is the nonexistence of complicated symbols: the black flag is simply black fabric with nothing on it. This may be a symbol of the rebelling starving, poor, and oppressed not in need of symbols or symbolism; all they need is the freedom and liberty they deserve and which has been ruthlessly stolen from them. It may also symbolize the impossibility of the starving and poor to manufacture fancy symbols to use in the rebellion.
Even though the black flag has been used by non-anarchists, we know that it has been used by anarchists for more than one hundred years, and that it is one of the very first symbols used in anarchist rebellion against rule, tyranny and domination. It was used during a demonstration of unemployed in the French capital Paris in 1883, as well as during an anarchist demonstration in Chicago the following year. The black flag was also used by the large number of people marching to Peter Kropotkin’s funeral in Moscow in 1921.
Howard Ehrlich describes the values and origin of the black flag excellently in Reinventing Anarchy:

Why is our flag black? Black is a shade of negation. The black flag is the negation of all flags. It is a negation of nationhood which puts the human race against itself and denies the unity of all humankind. Black is a mood of anger and outrage at all the hideous crimes against humanity perpetrated in the name of allegiance to one state or another. It is anger and outrage at the insult to human intelligence implied in the pretenses, hypocrisies, and cheap chicaneries of governments.

Black is also a color of mourning; the black flag which cancels out the nation also mourns its victims the countless millions murdered in wars, external and internal, to the greater glory and stability of some bloody state. It mourns for those whose labor is robbed (taxed) to pay for the slaughter and oppression of other human beings. It mourns not only the death of the body but the crippling of the spirit under authoritarian and hierarchic systems; it mourns the millions of brain cells blacked out with never a chance to light up the world. It is a color of inconsolable grief.

But black is also beautiful. It is a color of determination, of resolve, of strength, a color by which all others are clarified and defined. Black is the mysterious surrounding of germination, of fertility, the breeding ground of new life which always evolves, renews, refreshes, and reproduces itself in darkness. The seed hidden in the earth, the strange journey of the sperm, the secret growth of the embryo in the womb all these the blackness surrounds and protects.

So black is negation, is anger, is outrage, is mourning, is beauty, is hope, is the fostering and sheltering of new forms of human life and relationship on and with this earth. The black flag means all these things. We are proud to carry it, sorry we have to, and look forward to the day when such a symbol will no longer be necessary.

Another symbol commonly used in certain parts of the anarchist movement, and bearing strong resemblance with the black flag, is the black-and-red flag. It is a construction by anarcho-syndicalists used for the first time in the anarchist movement during the Spanish Revolution and the Civil War. It was originally used by the CNT (Confederación Nacional del Trabajo) in Spain and is based upon the black flag of anarchism and the red flag of working class rebellion.
The red thus symbolizes the material equality or principle “from each according to his or her ability, to each according to his or her need” of communism, while the black is for anarchism and hence social freedom, the freedom of each individual to do as they please so long as their actions do not cause harm to others. The red-and-black is a symbol mainly of libertarian communism and anarcho-syndicalism, i.e. anarchism together with the labor movement.
The red and black of the libertarian communist or anarcho-syndicalist flag are divided diagonally across the flag from the bottom left to upper right corners with the red labor movement flag on top of the black anarchist ditto. It is said to be divided diagonally to negate nationalism and symbolize a reaffirmation of internationalism.