The basic method is by hand with files. There are many sharpening guides on the market from simple to very complex. You need to know what size/pitch of saw chain you will be using, then get files & guides to match. It is a simple matter of holding the file correctly (where the guide helps a lot) and taking a few strokes with it on each tooth. You file from the inside out (that point will make sense when you look at a chain) so you do every other tooth from one side of the bar, then do the other half from the other side. Flip the saw or move around to the other side, depending on how you are set up.
You need something to secure the bar - with a standard bench vise/clamp etc, or a stump vise or the like meant for chainsaw sharpening.
There is technique to it, but mostly it comes down to consistency. Use the same pressure, same length stroke, and same number of strokes on each tooth. Over time, unless you are really good the teeth will probably get unbalanced and then it makes sense to use a bench top grinder (a specific kind for chain sharpening) or paying someone to true it up. The risk with grinders is taking off too much metal and using up your chain in short order for no reason.
A quick touch up of 2-3 strokes every couple tanks of gas through the saw will keep it in good shape.
A great source is Baileys
Husqvarna Chainsaws, Outdoor Power Equipment and Tree Care Supplies from Bailey's look under the category "Files" I have a basic Stihl guide and the older Pferd ones. Good and bad points about both. Some cheapo guides are too flimsy, but these are solid. You can't buy Stihl products online, only in person at a dealer.
Try it out. Especially on shorter chains, the cost of failure is small, and nothing you can't correct with another go at it, or to bring it to a shop to fix.
Here's a decent video, though it takes a good 2-3 min before he actually get to the sharpening. It shows the basic motions well.
Chainsaw Sharpening - How to Sharpen Which Chainsaw - YouTube
This one is kinda bad as he doesn't even secure the saw and the file angle is wandering all over. You generally need to hold the file perfectly horizontal for the full stroke (some chains take a slight angle, but the sharpening table on the chain box will tell you, and it needs to remain consistent). But none the less, it shows the principle:
How to hand sharpen a chainsaw - YouTube
One of those things that is far easier to show than describe.