the red affixes are Legend Affixes. most of these can be gotten using the Ruby Crystal, or you can use items that have them on them already. there are some Legend affixes that are only found on items, and can't be rolled using Ruby's. Mythic Affixes are the Purple ones. you make those from the recipe's you can find in your Codex. you put Myth Stones in the Sockets to make the Mythic affixes. each Mythic affix needs 4 sockets to make it. Resource Mythics can be on any item, but all the other Mythic affixes can only be on certain items. for example, the Resource Discordance can be on any item, but Harmony can only be on the head item.
just so you know, the more affixes that are on an item, the better it's item power is. so you could improve a Normal item by putting more affixes on it, and improving it to Magic, Rare, Epic. Legend/Eternal items can only be found, and Mythic items are made by players. Crystal items are either found or made by players.