Exporting into .gif

How do I export an animation such as a sig into a .gif where the quality will be good? Everytime I try and export something it looks really bad and low quality. Thnx in advance…