Regardless of what kind of turtle it is, it needs a trip to a vet. Setup information for Painteds should be very easy to find on the web so I won't repeat it here. If you can't afford a vet, you should really think about giving it up to an experienced rehabber. From your description, it sounds in exceptionally bad shape and will likely need a long convalescent period.