After you file

So let's say this year I pay 5000 to federal taxes when I only needed 3995. Does that mean I'll get $5,000 back? And I'll just put that towards the solar panels? Also are you familiar with how South Carolina state works?