Repair is a Sorcery in Dark Souls 2. To cast a Sorcery, you must use a Staff or Special Weapons that can cast Sorcery.
"A sorcery that dates farther back than recollection.
Repairs equipped weapons and armor.
Uses light to repair damaged weapons and armor. Supposedly this sorcery restores items to a past state, but with the knowledge of this art lost, the finer details of the phenomenon are unknown."
- After opening the shrine of winter continue down the path then turn right at the bottom, In some rubble.
SOFS: Shaded Ruins. In a chest behind a petrified lion warrior in the back left corner of a ruin after the end of the bridge you need a fragrant branch of yore.
- Does not repair broken equipment. Instead, acts as repair powder.
Does not repair equiped non-selected weapon. That means you should equip staff in left hand if you want to repair your right-hand weapon, otherwise you will only repair your left-hand weapon (or shield).