When most people in America think of the word "anarchy," they think of disorder and chaos. Somewhere like Somalia may come to mind. But when people identify as political anarchists today, this is far from what they actually mean. Most anarchists are actually in favor of a highly organized society based on voluntary associations between people and groups without a government. Of course there is variation among how anarchists things should best be organized. Many are in favor of anarcho-communism or socialism, but today I will be speaking from the perspective of anarcho-capitalism.
Firstly, let me start off by debunking the idea that Anarchy = Somalia. Somalia is a very interesting case in which the country's government suddenly collapsed and the country was thrown into chaos, because the people don't understand philosophical anarchism and the responsibilities that come with it. It would be like burning all of the churches in a country and expecting the people to understand what it means to philosophically be an atheist. The reason why an anarcho capitalist wouldn't follow this same pattern is because the government would dissolve due to demand from the people. The people would reject government services in favor of private services for virtually everything in their lives and eventually the state would become obsolete. Of course some political action would have to be taken in order to achieve the desired outcome, but agorism would play a huge role in the creation of Ancapistan. This would allow for a slow transition towards a stateless society and people would adapt very easily.
Now lets get to how services that the government currently provides could potentially be provided through the free market. The most common objection is the idea of roads. This objection is so common that it has become a meme in libertarian circles. Roads are now built via tax dollars in most cases. The government pays private contractors to build the roads. So instead of having a middle ma in the government, people could pay for the roads directly. Who woulda thought? Now how would they do this? Well in neighborhoods, you could have homeowners associations which could pay for building and maintenance of roads, while in towns and cities you'd have the private business owners on the street paying for the maintenance and building of roads. For highways most will probably be funded mostly by tolls. Although there are many other possible ways to get each of these services, I find these the most likely.
For police and military these would probably be funded the same way, except they may be called "rights enforcement agencies." These rights enforcement agencies will be paid by once again homeowners associations, road owners, and/ or private business owners to prevent and stop crimes in a particular area. One may say, "what about murder cases?" Well here's where things get interesting.
Courts would be private similar to how the triple A courts are today except courts would enforce a different sort of system of laws. So, if someone stole my TV then my rights enforcement agency would make an attempt to figure out who did it. Let's say they figure out it was John down the street. My rights enforcement agency would say "We know it was you. Give back the TV or else we'll take it by force." Then his rights enforcement agency would say "We're going to protect John." So then you would conclude that ancapistan would be in a perpetual state of violence with rights enforcement agencies going at it all the time. Well, not quite.
This is where the courts come in. The different rights enforcement agencies would know that it wouldn't be very economically efficient to be at war all the time, so they'd come to an agreement on a court. They would both get their clients to go to a court and the court would decide who is right. Now not every court will have the same laws and punishments as others. So what laws people want enforced will be decided based on which courts succeed based on what laws they enforce and what punishments they give for what laws. Many may have the objection of "what if a court allows for murder?" Well the fact is no one wants murder legal. Not even murders do, because if murder is legal that means anyone can murder anyone that includes the murderer. Courts that do that, which I highly doubt will even arise, will not last long at all. This poly-centralized law enforcement is the best way to ensure that what laws are enforced are the laws that people really want enforced.
The free market solves all things doesn't it? So long as there is market demand for a good or service that can plausibly be provided there is always a way for it to be provided. Humans should be allowed to organize themselves as they see fit and perhaps we can move towards such a society in the future. If we can raise our children with a mind for critical thinking and responsibility, then the demand for a centralized coercive entity will eventually diminish and people will figure out how to organize in far more voluntary and ethical ways, thus freedom will have prevailed and the archaic ways of the past will die.