Iphone 4 Battery Problems, with charging and without charging?

Hi

I recently got a used iphone 4 from my friend, he said the only problem was that is needed a new battery, which i bought.
I fitted it in and charged it for a long time. I'm not using it at the moment (my old phone contract expires in a few days) so put it on one side and of course, the battery died.
So i just plugged it into a charger a few minutes ago, and it started up again, but it shows the battery left is 50%, even though its been charging for only something like 2 minutes.
When it is plugged to a charger, it shows 100%, when it isn't, it shows 50%. I know that if i leave it for 10 minutes it will die out.

I don't understand what this means.

Make sure the battery is Genuine Apple battery no after market junk. Make sure the charger is Genuine Apple, also the Battery can't be after market because apple chargers will not charge after market battery's. I would go to apple near you and get a genuine Battery and they could sort out any issues with it.