I learned this from someone on YouTube. What they suggested was to use an eye shadow and an angled brush to sort of draw out the shape so that it can serve as a guide for you when you draw on your eyeliner. I personally prefer using fine nib pens or slim gel liner pencils. I find that it is easier to control and make less mistakes when the tip is fine, it is also more forgiving. I would also suggest starting with pencil liners because they are more forgiving, then work your way up to pen liners. Also, set your eye liner with some powder after drawing so that it stay put and does not smudge.
If you want a more defined line, I would suggest using a pointed tip cotton bud with a little makeup remover to clean up any mistakes or sharpen the edges. Otherwise, running a concealer over the edge of the liner will clean up any mistakes and make it look sharper too. I hope it helps!