There are two basic kinds of 2D graphics. Vector based and Pixel based graphics.
Vector based graphics are drawn with coloured curves and gradients (often made with Adobe Illustrator). Because of their mathematical nature they are infinitely scalable. Pixel based graphics on the other hand are like rectangular mosaics and come in a specific resolution (often edited with Adobe Photoshop).
There is also a hybrid approach that takes the best of both worlds. You can draw your image with vector curves and refine it with pixel-based brushes e.g. on a graphic tablet (Serif Affinity Designer). Todays computers have become very strong. Therefore you can start out an image with a fairly high resolution.