Legendaries are random drops. This means they can be better or worse than Magic or Rare items. The classification of items (into Magic, Rare, or Legendary) is based on the number of stats that they grant. For example, armor that has Strength, Dexterity, Gold Find, and Magic Find would be classified as Magic since it has four stats. If it also had Intelligence on it then it would have five stats and would be classified as Rare. I don't remember the number of stats for each level of classification, however, this is essentially how things are broken down into different rarity groups.
As previously mentioned, there are also craftable items that are categorized as legendaries. To craft these you need to get a pattern to drop and then teach it to your blacksmith. Alternatively you can buy them on the auction house from other players that have found the patterns and crafted them.
I have not been able to find a single legendary item and I've played through the game several times already.