Your objective in Portal Knights is to find and build portals that will grant you access to new levels. These levels will be worlds of varying biomes that are inhabited by humans and have things such as shops, farms, and mines to explore. There is an element of danger in these worlds as they will also have strange creatures lurking around them that will attack you. What you do in these worlds is entirely up to you, whether you want to construct your own buildings, dig the mines, or just tear the place apart collecting resources.
Your main objective in Portal Knights though is to explore, craft materials, and work your way through the game's story as one of the three classes of characters (Warrior, Ranger, or Mage) gaining experience points. As you make your way through the game the enemies will become tougher to defeat and alothough dying in battle will not cause any issues or loss of progress it does mean that you will have to grind to gain experience, or search across the worlds that you have already unlocked for specific materials that can bring you some higher quality armour and weapons that will help you defeat your foe so you can progress.
Whether you decide to play by yourself or with others online the tasks that you will be completing will be exactly the same. This makes playing as part fo a team less daunting than by yourself as you will be able to share tasks and it will be easier to defeat enemies if you are part of a group. The flipside to this, though, playing alone means that you have full control over each world and the materials within, therefore allowing you to create the strongest character possible to suit your needs.