iPhone 4 would not turn on unless it is plugged in So my phone would only turn on when it's plugged in and I just bought it yesterday so I'm kind of frustrated because I don't know what do about it.
Your battery is mostly likely dead and needs replacing. You have three options:


Take to an AppleStore (expensive - and probably not cost effective as you have bought the phone second hand);
Purchase a replacement battery and replace it yourself
(Luckily, replacing the battery on the iPhone 4 requires minimal
disassembly), or;
Send it to a battery replacement service (easily found online, or
offered through eBay, and not too pricey)


This has happened to me many times (5 or 6 times) and I always go for option three, because I am lazy.