Regarding anarchist ways to deal with crime...
...well, it's a complex topic, and somewhere quite early into this topic, terms like "mutual aid networks" and "self-defense" pop up.
In an anarchist society, opportunities for catching and punishing a person for their crimes after the fact, will be limited. At the very least, true freedom of movement and lack of central and mandatory identification of persons would ensure that. One may recognize a person if one managed to record them, or in case of crimes which offend prevalent ethics, gain the voluntary assistance of numerous people to help with that, or negotiate some assistance in return for a compensation... but that doesn't go far. It's a safe bet that nobody is going to respect the authority of any court, and any attempt to build a prison will be promptly stopped.
Thus, the focus in an anarchist society must inevitably reside on preventing crime -- both preventing the material reasons for crime (poverty), preventing ethical preconditions for it (not giving a fuck about others), and finally, preventing crime from succeeding or being profitable (self defense; material objects with owner loyalty; deniable and destructible representations of value [1]).
[1] This is where Bitcoin fits in, by the way, as it's easily destroyed by having a machine forget an encryption key, easily restored from offsite backups, its existance can be easily denied.These goals can be pursued in countless ways. The networks of mutual aid which some anarchists already participate in (to maintain some safety against state and other likely attack vectors, e.g. nazis) are not only suitable for existing under oppression, but likewise perfectly suitable for helping out neigbours. Their "quality of service" can be vastly improved.
It's such a long topic, so that for a change, I would like to offer an example of one anarchist encounter with (non-state [2] ) crime.
[2] The state itself is a big can of worms, it nicely fits the pattern of organized crime, but clearly even intuition can tell that unlimited action is not justified against it. High-intensity conflict ("war") against a structure which people are dependent on, is unlikely to bring success. Being a complex and deeply rooted institution, state (just like mafia) needs to be uprooted through a prolonged campaign of attrition, creating independent alternatives for its useful functions, offering paths to independence of its doubtful services, and incapacitating its harmful functions.
There is a squat (an abandoned house which has been illegally occupied) somewhere. I (note: one of the users of the "cpunks" account, the number of whom shall remain unspecified) occupied it with friends, and has been using it for 2 years now. Mostly as a factory.
Recently some guy, probably a short-term inhabitant of a neigbouring summer gardening slum (also a squat, specifically built on squatted land, just with no political tendencies), saw a lot of aluminum on the ground floor of the workshop (cut and readied for welding, since we build stuff there). That sight overcame his ethics. Thus one morning, when everyone had left to various errands, he brought a big hammer and started hammering the concrete beam cast around the lower part of the window bars.
He successfully broke in, and took a look into the corridor, where a large bottle of argon and various interesting stuff was located. That's when the motion sensor noticed him and dispatched an alert to a handful of people. One of the people activated the eavesdropping functionality of the alarm system, and confirmed that this was intrusion, not a false alarm.
That person had a car nearby, so they grabbed 2 cans of pepper spray, a revolver, a camera, a phone (we don't have autonomous emergency communication unfortunately, though I want this to change at some point) and sped off towards the squat. That person then called another one, who got a taxi, and likewise got on their way to the site, together with their friend. A third inhabitant couldn't be reached until a later time, and a fourth was out of town, etc. Some non-inhabitants were also called, and some set on their way to the house, awaiting more info about the situation.
The person with the car arrived first, parked it 50 m away behind a natural obstacle, approached and assessed the situation, confronted, suprised and thorougly pepper-sprayed the thief (in compensation for their hard work at breaking and stealing shit). The thief tried throwing a crowbar at them, but having been throughly pepper-sprayed, failed miserably. Since the anarchist had no intent of attempting to stop the thief from running away, he settled with taking a photo of the guy to aid future recognition (this actually failed, since the anarchist in question was not very competent at handling two pepper spray cans and a camera simultaneously) and finally fired a warning shot from a blank cartridge at the thief who was already running away (to emphasize the reasons why he should not return, even if he could raise some more theft capacity).
Then, others arrived and helped carry the stuff back into the house, and cast the window bars back in place. The squat is again fortified to its usual degree. The thief will need to wash their face for about 2 days, since they got a quite extraordinary quantity of pepper spray (reserved for managing a confrontation with at least 4 nazis in case of problems). The thief will also need to acquire (steal, probably) a new demolition hammer, crowbar, pair of pincers, rucksack and handbag. Then, they can figure out if they want to continue stealing or perhaps gather scrap metal instead. Enough of that lying around from Soviet times (yeah, I've partially disclosed my location by telling this). Or perhaps they'll prefer to get otherwise occupied with some productive form of activity. Perhaps if he needs some stuff badly enough, he can visit the local freeshop where people bring stuff which they don't need, and get it for free.
Either way, this rather pedestrian crime was first obstructed by fortification and early warning systems, then stopped by rapid response by a private mutual aid network, and some form of retribution was dispensed, which the individual involved certainly found unpleasant enough. However, I am perfectly aware that this little story only covers a tiny part of the scope of the word "crime".
Furthermore, I am perfectly aware that the definition of "crime" covers myself too. :D After all, I have participated in seizing for anarchist use, a house which was (right?)fully built by the Soviet state, for money it had honestly monopolized the creation of, resources it had honestly robbed, on land it had straightforwardly annexed. :D None of the parties involved is beyond blame, and the stuff about property and theft is not as simple as Proudhon wrote. :P
The current form of state thus has a "valid" claim to its "property", which we are in violation of. :D Well, we reckoned that something abandoned for 20 years cannot possibly considered anyone's property, so we took it, repaired it, and nobody came to complain. :P Life is somewhat complicated.
And to add complexity, well myself personally, in addition to squatting abandoned houses, I would whole-heartedly welcome workers taking over their businesses in most commonplace capitalist conditions (except if it was a fair business in which its owners would also be actively involved, as opposed to dispatching commands via 11 intermediaries), and well-targeted sabotage (destroying without taking, out of inability or unwillingness to attempt seizing it for own use) of state property.
One might thus perceive a degree of hypocrisy or inconsistency in the above, which I would however advise to examine closer. The principles of running one's own life, and not running other people's lives, and not messing with them unless they mess with you, is the key to understanding it. The potentially unjust activities which I wholeheartedly support, I support for counteracting injustice being done, if they seem proportional to it.