I'll try to go through this quickly :) and disclaimer: I'm not an electrician!
The first unwritten rule in noise reduction is to record with as little noise as possible in the first place. Correct connections are always the best place to start. Just because you can plug an output to an input, it doesn't mean you should.
What you're doing, is what a lot of novices try to do (nothing wrong with this, you just lack the knowledge for now). They expect to be able to connect anything to anything and get a good, clean signal. You can't do this because there are different voltage levels for different things. This begins with microphone level, which is extremely small. A 3.5 mm/1/8" mic input is expecting a small current that's induced by the microphone diaphragm, vibrating in sympathy with sound waves (I'm trying to put this in simple terms for you).
The highest-level connections are where the opposite must occur, a current must drive a diaphragm, like speaker cones in headphones. To get the power up high enough to effectively drive the speaker cones, the signal must be amplified.
So... You have an amplified output signal feeding a relatively sensitive input. That sensitive input may have voltage limiting circuitry which will pull down the amplified signal to a minute fraction of it's original level, or it will simply overload the input circuitry, either way, gain is then applied and by the time the signal gets to your recorder it's probably going to be a hot mess. Not to mention the fact that computer microphone inputs are usually limited bandwidth and have automatic dynamics processing applied to try to mitigate background noise between words.
A word on the noise-removal side: You can't, no matter how hard you try, bring up the rest of the signal through simple signal level gain without bringing up everything else, including any noise present. A common, quick way to make a noise floor less perceivable is to use a noise gate. Most telephone signal processing utilise noise gates to reduce noise between words. That is the simplest way to remove noise in the time domain. After that, you begin to use more complex spectral noise-attenuation techniques. But this is not what you need. You need to record a clean signal, and as Tetsujin said, the best thing for you to do is get a decent Audio Interface. You can then take the line out from your piano and safely connect it to a line input on your interface. This will dramatically reduce the noise floor of the signal.
Different signal levels explained simply
Another good user-friendly audio levels read
A conversation about this very thing on allaboutcircuits.com