If we accept one traditional definition of socialism — "advocacy of government ownership of the means of production" — it seems that anarchists are not socialists by definition. But if by socialism we mean something more inclusive, such as "advocacy of the strong restriction or abolition of private property," then the question becomes more complex.
Under the second proffered definition, some anarchists are socialists, but others are not. Outside of the Anglo-American political culture, there has been a long and close historical relationship between the more orthodox socialists who advocate a socialist government, and the anarchist socialists who desire some sort of decentralised, voluntary socialism. The two groups both want to severely limit or abolish private property and thus both groups fit the second definition of socialism. However, the anarchists certainly do not want the government to own the means of production, for they don't want government to exist in the first place.
The anarchists' dispute with the traditional socialists — a dispute best illustrated by the bitter struggle between Karl Marx and Mikhail Bakunin for dominance in the nineteenth century European workers' movement — has often been described as a disagreement over "means." On this interpretation, the socialist anarchists and the state-socialists agree that a communal and egalitarian society is desirable, but accuse one another of proposing ineffective means of attaining it. However, this probably understates the conflict, which is also over more fundamental values: Socialist anarchists emphasise the need for autonomy and the evils of authoritarianism, while traditional socialists have frequently belittled such concerns as "bourgeois."
When we turn to the Anglo-American political culture, the story is quite different. Virulent anti-socialist anarchism is much more common there, and has been from the early nineteenth century. Great Britain was the home of many intensely anti-socialist quasi-anarchistic thinkers of the nineteenth century such as Auberon Herbert and the early Herbert Spencer. The United States has been an even more fertile ground for individualist anarchism: During the nineteenth century, such figures as Josiah Warren, Lysander Spooner, and Benjamin Tucker gained prominence for their vision of an anarchism based upon freedom of contract and private property. And in the twentieth century, thinkers residing within the United States have been the primary developers and exporters of anarcho-capitalist theory.
Still, this geographic division should not be over-stated. The French anarchist Proudhon and the German Max Stirner both embraced modified forms of individualism; a number of left-anarchists (often European immigrants) attained prominence in the United States; and Noam Chomsky and Murray Bookchin, two of the most influential theorists of modern left-anarchism, both reside within the United States.