I've been playing a lot of ranked in League of Legends and I've had games where I end up with a positive K/D score. For example, I played Shen, scored 16/3/12 and we lost. My team fed but I still lost points, 18 LP to be precise. Do you lose points when you lost and get them when you win or is there some other system effecting my rank?
Your in-game score is irrelevant for LP gain/loss. It is calculated based on the game's estimation of the relative skill differences between your team and their team, as calculated by win/loss history; and by the difference between your current LP and the game's estimation of your skill level. This second category helps dampen the effects of streakiness, and ensures that there's a penalty for a loss even in D5 of a league.
As a side note, if you have that many kills as Shen, and your team keeps dying, it's possible that you need to work on your teamwork a bit more, saving people with a well-timed taunt/shield.
Your kill/death ratio has very little to do with the LP you win/lose. Else it wouldn't be fair for the support since he'll get almost no kills. Besides, everybody would be scared to fight due to the possibility to die (and lose LP accordingly). This way, nobody would help you in fights anymore.
The way LP is distributed is hidden though. The matchmaking system makes a calculation on who will win, and their odds of winning.
The less chance you have to win, the more League Points (and hidden ELO points) you'll get if you do manage to win. If you receive a high amount of LP, the system expected you to lose versus the opponent. If you'd indeed lose, you wouldn't lose that much LP
The other way around is possible as well. If you win and receive a low amount of LP, the system expected you to win. Therefore, you gain a low amount of LP.
If you get near the promotion series, it's possible you gain very little LP (even 0 LP gained is possible). In meanwhile, your hidden ELO goes up. You'll get better at the game while the system determines if you are indeed worthy of promoting. If your ELO matches your LP standings, you'll be able to promote since you've proven yourself worthy of that division/league.
So to answer your question in short: Yes, you lose points when you lose and win points when you win.
The amount of the points you win or lose is based upon several hidden variables. Known is your ELO and your opponents ELO have influence on the points gained or lost.
If the system thinks you should win, you gain little LP for winning and more for losing, but your opponents are statistically seen worse then you. If the system thinks you should lose, you gain a lot of LP for winning and less for losing, but it'll be a harder game since the other team is statistically seen better.