Rubies are a variety of corundum crystal, the same species as sapphires. The key difference is their red color, caused by trace amounts of chromium. This spectacular red color is why rubies have a distinct separation from sapphires in the gemstone world. There are also different types of rubies including natural rubies, treated rubies, and synthetic rubies.
A natural ruby is one that formed in the earth through natural geological processes. Most rubies on the market are natural rubies, although the vast majority of rubies have been treated in some way.
Most natural rubies are also treated rubies. Treated rubies still qualify as natural rubies since the stone formed in the earth. Of all available treatments, the one that is most widely used and accepted is heat-treating. In this process, the rubies are heated to certain temperatures in order to heal internal fractures (which happen when forming naturally), remove undesirable coloring, and dissolve clarity-reducing inclusions.
Other treatments for rubies include beryllium diffusion, which adds a layer of coloring to the outside of the corundum crystal, fracture-filling with colored glass, and heating them with flux (this is to rubies what bandages are to us) to more durably fracture-fill rubies.
There is controversy over use of treatments in the industry, as well as a fluctuation in pricing (treated rubies cost less than untreated ones due to rarity of untreated material). These factors, amongst others, make full disclosure of any ruby treatment before purchase a necessity.
An untreated ruby is a natural ruby that has not been treated at-all. The color of the stone in front of you is how it looked when being mined from the earth. These are the rarest, and most valuable rubies.
A synthetic ruby has the same chemical and crystal composition as a natural ruby, but was grown in a laboratory rather than the earth. There are different methods of growing them, but any ruby grown by man-made means is synthetic. There are also some basic ways to identify them, however some a too difficult to determine without an in-depth chemical analysis that all reputable gemological laboratories form.
Not all gemstones that are called “rubies” are actually ruby. The term “ruby” is sometimes applied as a trade name for other types of gemstones. However, these gems do not share any of the physical characteristics or chemical properties of corundum (Al2O3) rubies. Also note that stones like garnets and spinels (which look similar to rubies) can grow with rubies, meaning that they can be confused without proper verification.
For reference, below is a list of common gem trade names and their actual gemstone type.