Broadly speaking, there are two general categories of crime fighting. The first is preventative and the second is reactionary. Anarchists generally focus on the first, though don't forget about the second. States, by contrast, tend to focus on the second, though don't forget about the first.
To prevent crime, anarchists focus on the societal ills that cause it. Generally speaking, crimes are done for four reasons. First, for need. Second, for passion. Third, for maintaining power. Fourth, because of a mental disorder. The first is primarily an economic problem. Anarchists generally see their economic policies as eliminating need, but to go into this further would require its own blog post, so I'll leave it at this, for now. I'll continue having accepted this claim as true, despite not having demonstrated it, since I will in the future and there is not enough space to do so here. However, there are some which aren't economic problems. For example, rape can be, in the loosest sense, a crime of need. This is when someone has a high libido at the moment but no healthy way to express it. That form of a crime of need can be dealt with socially through sexual liberation making sex more commonplace and allowing more healthy avenues of sexual expression. Generally speaking, when it comes to crimes of passion, some can be dealt with and others will exist regardless of what is done about it, be it by state or commune. The ones that can be dealt with generally stem from broad societal problems stemming from oppressive societal institutions. These are stuff like people hanging black men in reconstruction era south. These are things the state is powerless to solve. Solving these require mass social movements from below. Indeed, that is how these are being combated. Mass movements like feminism, gay rights, anti-racism, and other such movements are fighting these oppressive institutions quite successfully, though they have a long way to go. The ones that generally aren't solvable are ones stemming from in the moment rage. This is stuff like a man killing his wife because he just caught her sleeping with another man. For the most part, these cannot be dealt with. However, they can be reduced through preemptive therapy. This is, once more, a social issue. If it is socially acceptable to visit a therapist, or, indeed, not socially acceptable to not visit a therapist, then most will visit a therapist and will have a better handle on their anger. This would reduce the amount of the second form of crimes of passion, though not as impressively as any of the other reduction techniques I have proposed, though that's no justification for the state dealing with that sort of crime since the state doesn't have any tool for preventing that sort of crime of passion unavailable to an anarchist society. Crimes for maintaining power would not be an issue in an anarchist society as in a statist society as no systems of power exist that need maintain themselves. However, as clarification, I should note I'm strictly using the second, not first, definition of crime for this, as with others. This one, in particular, is referring mainly to state or capital action to preserve its power, such as through police brutality or Pinkertons. This is a form of crime that states themselves participate in, so asking a state to fight it would be absurd. Moving on, I've already hinted at the solution to the fourth in the solution to the second. Comprehensive mental healthcare available to all and societally acceptable, with not accessing it not being societally acceptable. This isn't a complete solution, though it is certainly more effective than therapy dealing with crimes of passion. However, those who have a mental disorder which is prone to making those with it a danger to themselves and others would be far less prone to hurting others if such a system were in place.
Now, while the above would drastically reduce crime rates, crime would still happen. After the fact solutions must be put in place. Or do they? Putting someone in prison doesn't make the crime go away. Indeed, it doesn't even discourage people from committing crime. At best, it keeps those who would harm others separate from society, but it also teaches those who commit smaller crimes how to commit worse crimes, and causes people who commit crimes to become disassociated from society preventing an easy return to society which causes a return to crime. Better solutions exist in the Scandinavian countries. They engage in comprehensive rehabilitation where they send criminals that tends to be comfortable and employ many therapists and psychologists as well as teaching the criminals how to return to society. They are far more successful, and far fewer people who go to them commit crimes again. However, I still have reservations with this. For one, I think that forcing them to go is unnecessary. By discontinuing the benefits members of the commune enjoy, such as getting things for free, while giving them materials that would allow them to create what they need to survive, if they do not accept the rehabilitation, thus basically saying that, if they don't want to play nice, they can play by themselves, as well as making rehabilitation a pleasant process, we would encourage people to choose to be rehabilitated, and no coercion or force would be necessary. Then therapists and psychologists could help them through their problems and prepare them for rejoining society. In that way, they would become far less likely to return to the same patterns of crime they fell into before.
Through this two pronged effort. crime would be less of an issue than it is in modern statist societies. The state is not necessary for preventing crime and, indeed, commits crimes regularly to preserve its power.