The real answer to your question is with a lot of hard work and/or a lot of money. You can't really ride with somebody one day, and be slow, and then show up to ride with them the next day and be way faster than they are. Well, you can, but in your case you'd have to progressively tune the motor of your bike while making the gearing shittier so that you'd still suck off the line, and never go full throttle, and then when you've got it dialed in, switch back to good gearing and blast them. Either way, this is beyond where you are at this point. Reading around is the best thing for you to do right now, learn as much as you can.
Kits are expensive, but produce a lot more power.
Pipes are cheaper and easier, but tend to help you out in very specific areas.
Different sizes and styles of carburetors also have different advantages and disadvantages.
Gearing is key.