Whomever lands the killing blow on a champion gets the kill. There are however various effects in League, particular more now than in recent years, that can deal damage and much of it so low-profile and even the person doesn't know how they killed a person.
Scorch for example, is a rune in the game that deals delayed damage after a person hits an ability (1 second after) If they hit a person, then you hit them, and scorch just barely goes off after that, it is the Scorch player's kill even if it appeared that you struck the last blow. Damage over time, no matter how small, also does this.
Items like Liandry's (mage item) has an effect that makes all ability damage deal a small damage-over-time burn, and if even a tiny tick of damage goes off after your damage, it is their kill instead of yours.
Sometimes all these effects are hard to see, but in time you'll come to recognize them more.