In order to reach level 30, you must complete a lot of quests in order to gain as much experience as possible. You can gain experience for killing people/creatures, completing missions, and completing challenges.
Make sure to complete as many missions as possible, as they give you a lot of experience as well. If you can't beat a mission, skip it for now and come back to it when you've reached a higher level.
Killing high-level enemies are also good for accumulating experience.
Completing challenges is also a productive way of gaining experience, although these will unlock as you play through the game. Challenges unlock for all kinds of things, and there are challenges available for all play styles. To view the current status of your challenges, press the Back button, scroll to the mission progress screen, and press Y.
By doing enough missions, you should be able to get to level 30 near the final missions in Rust Commons if you are playing on your own or with players of your own skill level. Playing with high level characters will net you massive amounts of experience, and you can level very quickly, but it will also be much more difficult for you to survive and help your teammates.