428.5.a. The Killed Unit or Gear is said to be Killed by that Game Object.
428.5.b. A spell or ability that contains a Kill instruction is responsible for Killing the Unit or Gear.
428.5.c. When one or more Units is killed due to a Cleanup, that kill action is attributed to the spell or ability that resolved immediately prior to that Cleanup that dealt damage to the Unit or Units. The player responsible for the deal action is responsible for the kill action.
428.5.d. Abilities originating from Game Objects that are attributed Kill Actions are attributed in addition to the Game Object that created them. Example: There is a spell that says "Do this twice: Deal 3 to a unit." Immortal Phoenix is a unit that says "When you kill a unit with a spell, you may pay [1][C] to play me from your trash." A player plays the spell while Immortal Phoenix is in their trash. The "do this" phrasing means that it has a reflexive triggered ability, which places two triggered abilities on the chain. As each of those triggered abilities resolve, it deals damage to the unit chosen for that ability. If one of these abilities deals lethal damage to a unit, both the spell and its ability are considered sources of the damage, and so both the spell and its ability receive attribution for killing the unit. This means that the spell's controller killed a unit with a spell, so Immortal Phoenix's ability will trigger.
428.5.e. In order to Kill something "with" a spell or ability, the Kill action must be attributed to the spell or ability, the player must control that spell or ability, and the player must be responsible for the Kill action.