A bike wheel rim can usually be repaired if it's only slightly out of true. If there is a more serious 'dent' in the rim, then it will have to be replaced. People often leave the task of trueing a bike wheel to their local bike shop, but once you know the procedure it's easy to do at home. You will need a spoke key and preferably have a wheel truing stand. If you don't have one of these, you can put together a makeshift truing stand by lashing a pencil to your front forks.
This is a long guide, so you can choose to either watch the entire video above, or follow it in smaller chunks by clicking on the individual steps below.