08 rzr 800 isnt charging

I had the motor rebuilt a month or so ago and went riding this weekend
yesterday the battery light came on and was flashing,it started runing bad so we switched batteries so we could get back home
It drained the 2nd battery in about 30 min
my questions are does it have an alternator or a stater?
is there other things that can make this happen?
Crap im sorry that i posted this in 900 forum so can a mod please move it?
Thanks