There are many ways to make ruffles, but some of them are out of fashion now. Ruffles went through several hundred years of development and changing fashion, and sometimes went by different names, depending on the construction method and where they were attached to the garment.
The most common ruffle (today) is a long strip of fabric that is gathered along one long side. Stephie has already listed various ways how to create them. Pro tip: If you sew 2 gathering stitches in parralelparallel and pull both of them, the ruffle will be neater and easier to attach to the straight fabric.
If you sew your gathering line in the middle of the strip of fabric, you end up with a double ruffle or frill.
A ruffle that is not gathered can be achieved by cutting a big circle, spiral or halfmoon shape from fabric and sewing the inner edge in a straight line to the piece of clotingclothing. Since the inner circumference is smaller than the outer one, the fabric is longer on the outer edge and falls in waves. ThechnicallyTechnically this is called a flounce or circular ruffle.
You can achieve a very similar effect with knit fabrics. Knits like jersey are stretchy, so by stretching the edge of the fabric while hemming it, you automatically create a ruffle.
To create a jersey frill, cut a long strip and stretch the fabric along the short width while feeding it into your machine. This automaticallygathersautomatically gathers the center of the strip. Have a look at this video tutorial.
Historically, there were also pleated ruffles, but they are not very common anymore. Knife pleated ruffles can be made relatively easily on a sewing machine and there are even special sewing foots that automatically pleat the fabric while it's sewn. Box pleated ruffles are a little harder to make because (as far as I know) there's no way to automate the pleating (at least not for a hobby sewer). Often these are simply called pleats.
Knife pleated ruffle, image source
Box pleated ruffle, image source
As with the gathered ruffle, you can move the gathering line to the center of the fabric to get pleated frills.
One very special way of pleating is the cartridge pleat, which is most prominently seen in historical ruff collars. If you make your pleats very small and tight, you end up with a ruffle that stands perpendicular to the fabric it's sewn to (if it's sewn in the correct way).
Cartridge pleats, image source