Can I switch my active SIM card from my iPhone 6 to an iPhone 5 and my data and number carries over?

My iPhone 6 has been acting up and is slowly rejecting a charge so I want to buy a used iPhone 5 and switch my active SIM card into it. I wanted to make sure it works or would I need to go to my carrier and have them do something on there end?

Yes, all you need to do is move the SIM card.
You may need an adapter; I can't remember for sure but I think the 5 uses a micro rather than nano SIM.

Adapter frames are very cheap - or if you still have the original full-size SIM card just press out the micro size part and fit that back to the nano SIM.

Also; if you iphone 6 still has the original battery and has not been damaged, an Apple store should fit you a new battery for about 25-

With an otherwise-good phone, that's the most economic solution.

It's also worth doing a backup and a full DFU restore with itunes, as that can fix various erratic problems.
(It's the equivalent of a full format and operating system reinstall on a PC).

Assuming both phones are on the same carrier, then yes that's not a problem at all.