How do I stop the second floor of my house from being so hot in the summer and so cold in the winter
Sounds like your problem is insufficient attic insulation. In the summer, your attic gets hot, and that heat radiates down into the second floor. In the winter, your attic gets cold, and sucks heat out of your house, aided by the stack effect. Improving the insulation on your attic flow will help both of those problems. The typical approach is to blow cellulose into the attic floor. But be careful! If your house is old and there's already any blown insulation, it might be asbestos-laden vermiculite. You might want to consult a pro. Often it's barely more expensive to hire this job out than to do it yourself.