So, how do you do it? Honestly, I'm not particularly sure. In my opinion, my weakest aspect as a GM and a story teller in general is the beginning. When I am writing, not that I do it much or well, I tend to start 'en medias res'. It means "in the middle of things" and is essentially where you start right in the middle of some action sequence or another, and then pull back and show how the story got to that point before continuing on through it to the end. It is a method that can work very well in any work where the audience has no, or only limited, influence of the outcome of the story. In things like RPGs however, it does not work as well because there is no guarantee that the players will do what you need them to do in order to bring about that point.
That isn't to say en medias res can't be done in a game, I've done it a couple of times in sessions for games I've ran, usually to success, however those were limited situations where the PCs really did only have a finite number of choices. I also explained what I was doing before hand, and some of the players made choices that specifically helped that glimpse of what was coming come into being.
So, what do you want in a beginning? Well, a beginning as hard as it can be to find where to start with does have a few things that you want in it. Some of those things are.
The beginning of the game should introduce the characters. Introduce the world, and at least hint at the coming situation. If the PCs are not starting as an already made group, it should bring them together for the first time, let them get to meet each other and see who the others are. If the PCs are starting as a group, then introduce the group to the game, and the world to the group. Set down some things, some fluff NPCs for them to latch onto or not. First impressions are powerful, so if in you're first session you really drive home the feel of the world, it will stick with your PCs. By the same token, you really want to hammer home the feel of their role in the world, and of those NPCs around them.
#2 What They Can Do
In my experience it is always good to have something, or somethings, set in the first session to help get the players used to how their sheets work mechanically. Inexperienced players can use this as a baby step into learning how the system works in game, getting a chance in a "safe" environ to have to make some rolls and see how things work. Experienced players can also use this introduction to their sheet, as well as being confronted with a few different situations to see how they react. I can't tell you how many times I've been sitting at a table, and forced to grin as it was discovered that the fighter/barbarian type would try to talk things out before fighting, while the mage or the rogue was all about instigating a bar brawl and solving problems that way. Meeting your character happens in the first session (see #1), but so does meeting your mechanics. There might be some glaringly obvious things that the player missed, so why not give them a chance to find those things, so they can fix it before the game gets too far in and any change would be strange.
#3 Set Up the First Obstacle
This goes with introducing the plot, but set up the first obstacle for things that are going to get into the PCs way. This doesn't have to give away the entire plot, but it should give them a small lead-in plot or at least hook to get them going. They can find the other threads in pursuit of that, but if your first session ends and the players aren't sure what is going on, or what comes next, that is usually not a good sign. That doesn't mean that the beginning can't be a self-contained situation, just it needs to also lead into where things may be going.
Yep, using Star Wars as an example. If Star Wars was an RPG, the beginning of the game would end when they make their break from the Death Star. Honestly, the first group session really doesn't begin until they get on board the Death Star either. Before that is essentially intro stories for them.
In Leia's introduction we get to meet her character as her mission is being foiled by the Big Villain Darth Vader. She gets a minor confrontation, and we find that she is a person who doesn't back down even against a truly imposing threat right in front of her.
Luke's introduction is wrapping him up with the droids, introducing him to Ben, and getting to the Death Star. We find that he is a good kid, a bit of a whiner, with dreams of seeing the stars. His family is killed freeing him up to go on his epic adventure, where he starts to be trained (seriously, look at Luke before the Death Star and on it. if that isn't going from a 0 level nobody, to at least a level 1 PC, I'm not sure what is)
Han's introduction is a bit smaller, but then again Han is a rogue and we don't want to know too much about him off the bat. We learn enough to know he has a companion in Chewbacca, a lot of debt, and isn't afraid to shoot first though if he can use his social stats to get out of trouble so much the better. We also learn Han is a bit arrogant, and not prone to believing in things like religion.
We get to the first full session as the group all meets up. Luke, Han, and Leia in the detention block. The opening is a bit more heated and action packed, but then again they all already had introduction scenes that involved the basics outlined above (including at least 1 "combat" for each of them). The characters are introduced to each other, the first part of the plot given to them, and they're off through a series of challenges that despite the intensity actually aren't all that dangerous. Luke's character is given a further nudge as Ben is killed by Vader, establishing the Villain that is important to his story and also denying Leia the real help she was looking for (what is that you say, a vacancy in the hero department? I just happen to have a few PCs right here!)
The "session" ends with the battle with the Tie Fighters, where mechanically I'd lean towards being a much harder fight than Leia dismisses it as, if only going off the exultation Luke and Han show with each TIE that they kill (as opposed to the calm present despite being chased by dozens of Storm Troopers earlier). Free and clear, the session ends with Luke wanting some justice for what happened to Ben, Han wanting his money so he can pay off Jabba, and Leia needing to get help for her Rebel Alliance. The adventure of escaping the death star is done, but that self contained node leads into the much larger plot that carries the characters through the rest of A New Hope and the next two movies.
As I said above, I'm really bad at beginnings. The players all said they liked the beginning to the Greymoore game, but I see it more as a fluke than any growth on my part right now. However, I do know the value a good beginning to have. Greymoore has managed to ride the wave from that introduction session all the way through to now, and that strong beginning I think is part of why the players all seem to like the game so much.
So, if you're working on starting your next campaign, give the beginning a bit more thought before just going off to wing it. You can do a lot with a Beginning, and when you do you can receive even more.