short form, porting is like the valves and the cam in a car, bigger valves flow more and the cam comtrols how long, how far and when the valves open.
In a 2 stroke, larger ports flow more, but they must be ballanced with the time that they open and close. making the ports bigger flows more, changing the hieght changes when the ports open and close. different port timings can change the bottom , mid, and top end power or any combination. Porting also cleans up casting flaws and imperfections as the factory doesn't.
Idealy the porting, pipe and carb are all matched so as to work in unison. A two stroke pipe works by the exhaust pressure wave entering the pipe, expanding and than when it hits the decreasing size cone, that wave bounces back pushing the exhaust back towards the cylinder. This keeps the incoming fuel/air charge from escaping out of the exhaust port. The pipe is designed to work with a specific flow of exhaust and the 'bounce back' is designed to work in a certain rpm or frequency range.
This means optimally the cylinder is ported to operate best in the specific rpm range the pipe is designed for and vice versa.
Carb size and reed setup are then matched to the airflow requirements of the engine.
So if you have your motor ported for midrange and a top end pipe and a small carb, nothing is matched and it will run like chit.
Most people think that a motor that has a hard hitting powerband, or comes on the pipe hard is fast because it feels fast when it hits. In reality it's slow. It has a very narrow rpm range that it actually works good at and suffers everywhere else. A well built motor will have a wide rpm range that is effective. This takes a lot of planning.
Thats why you have basically 2 types of engine builders.
1. Is the guy who may have a decent idea of how a 2 stroke works. He looks at the cylinder and says we can make this a little bigger and that a lot bigger and grinds away.
2. Is the guy who degrees the motor in and understands the timing requirements for the particular apllication, the figures out how to improve flow within those parameters. He understands which pipe or designs a pipe to work with the specific application.