If you look into the intake and exhaust ports of a stock 2-stroke cylinder you will find casting seams that are rough and on some engines depending on manufacturer or hours of use, you will also notice paint in the ports themselves. These are some of the first problems that a porting job will address. Every surface anomaly effects the air flow through the engine. By surfacing or resurfacing the walls of the intake or exhaust port, we are reducing drag (or air turbulence) and increasing air flow. Although you may not think so, this alone will make a noticeable difference in performance, even on an otherwise completely stock engine, but it gets better.
Cylinders basically consist of two parts, the casted "housing" and the cylinder sleeve which is pressed into the housing. Besides the larger ports you see on each side of the cylinder where the reed cage and exhaust are mounted, there are also other channels, namely "transfer ports" that come up from the base of the cylinder along the sides of the sleeve and connect into the cylinder. At the factory, these cylinder/sleeve assemblies are mass produced. Almost always (yet some are way worse than others) the holes in the sleeve do not quite line up with the transfer ports that are opening into them. The result is an obstruction for the air/fuel mixture similar to someone driving straight into a solid wall. This is where porting makes another improvement. By cutting out the "wall" the air/fuel mixture is allowed to flow much more smoothly.
Another obstruction you will notice on a stock cylinder is the bridge that divides certain ports. Generally, these are cast as a flat surface that the intake mixture will run right into, much like the offset sleeves mentioned above. These pillars are extremely important, but they can be extremely improved as well. Instead of having a single flat surface to slow things down, these can be "knife-edged" to cause the air/fuel mixture to slide right by them with minimal resistance. Some engines also have "blocks" that are cast into the ports that also serve as air flow obstruction, these can be also be angled to allow the air to flow over them.
In addition to these problem areas that every engine can benefit from having modified, porting can also take the improvements a step further. The above mentioned aspects are basically about getting the most out of what you have without really effecting how the engine operates. Now it is time to talk about major engine modifications. Please note that these are the areas where experience really shines through and it is easy to make an engine perform worse than it did as stock.
The first on the "high performance" list is expanding the size of the ports. Anytime we modify the way an engine operates (or more specifically, the way air travels though it) we have to plan for a counter modification to keep everything in sync. For example, modifying the size of the intake port might also require a "balanced" increase in exhaust port size. It is not always equal however, depending on the engine and the application, this type of modification can be used to not only increase air flow, but also to tweak the engine's performance even more. Experience is a necessity!
The last engine modification we will talk about is port raising and lowering. This is the "finest" tunning that can be done on a high performance 2-stroke engine. The idea is to "move" the intake and exhaust openings in the cylinder. This adjusts valve timing in 2-strokes and just as in enlarging ports from the last paragraph, there is planning that must be done ahead of time. When we change the valve timing we also change the compression, there are areas in the system that can be optimized according to other engine components (big bore, stoker crank, etc.). Again this take a thorough understanding of how an engine works with certain performance upgrades.
If some of the modifications (especially the first ones) do not seem like they would have that great of an impact on performance, think about this. An engine running at 6,000 RPMs (which is nothing for a 2-stroke) must get the fuel it needs in and the exhaust is has produced out 100 times every second otherwise it can't preform or even worse, it could burn up in no time.
Now, a final note about multi-cylinder 2-stroke engines (or any multi cylinder engine for that matter). When doing modifications such as these, from the simplest "clean up" to the most advanced upgrade, on engines with more than a single cylinder it is extremely important to have each cylinder modified as close to exactly the same as humanly possible. The required precision instruments for measuring and the very closest attention to detail. Now think about a performance engine running at 15,000 RPM. The slightest difference can cause one cylinder to run leaner than another and at that speed it can't last.