How do you beat Ornstein and Smough in Dark Souls Remastered?

Quick answer: Use the pillars to split them up and focus one at a time. When one dies, the other absorbs its power and gets a full-health second phase.
Show walkthrough (quest spoilers)
Get help
If you are in human form, you can summon Solaire on the stairs near the fog gate when his sign is there. A summon draws one boss away while you focus the other, which makes the fight much easier. Fire weapons and fire pyromancies hurt both of them.
Split them up
Ornstein is fast with a lightning spear; Smough is slow with a huge hammer and charges at you. Use the pillars to block one while you attack the other. Pick which one you will kill first before you go in, and stick to it.
Phase two
When one dies, the other absorbs him and gets full health back. If you kill Ornstein first, Smough gains lightning attacks on his hammer slams. If you kill Smough first, Ornstein becomes giant with longer reach and bigger lightning attacks.
Which order?
Killing Smough first is usually the easier fight, and the giant Ornstein is weak to fire. Killing Ornstein first makes for a harder second phase but a different reward. Smough is weak to lightning only in his first form.
Rewards
The survivor drops 50,000 souls and its soul: the Soul of Ornstein or the Soul of Smough. Killing Ornstein last also gives the Leo Ring. Then go up to Gwynevere, as told in the Anor Londo walkthrough.
