it uses your active pyromancy if you hit R1 holding it in your right hand or L1 holding it in your left hand and the R2/L2 buttons will punch with it for moderate fire damage that scales with intelligence and the level of the flame.
You equip spells at a bonfire by selecting attune magic.
You need enough attunement slots to actually equip the spell though, and you get attunement slots from leveling up the attunement stat. You get your first slot at 10 attunement, then every two points in attunement until 16, where it takes one additional point for each slot. So 19, 23, 28, etc. --- Is there something about the way I type that makes it sound angry? Maybe it's just something about the way you read.