The easiest and first thing you'll want to do if your CD player is acting up at home is clean it with a damp cloth. Sometimes the player, or lens, is just a little dusty and needs to be wiped off. Reach as many areas as you can when cleaning and if you feel comfortable, unscrew the player to reach more areas and then put your player back together. Use a CD you know is in good condition as a test to make sure it's not just an old, damaged CD causing your player's problem.
If the initial damp cloth cleaning doesn't work, you may want to use a Q-tip with a bit of rubbing alcohol or hydrogen peroxide on it. Don't use any household chemical cleaners because they can damage your player. The website Gizmo Highway recommends purchasing a CD lens cleaner because some players have hard-to-reach lenses. If you are able to, unscrew your player and find the box with the lens to wipe gently with your homemade Q-tip cleaner. Use the other end of the Q-tip to dry the area, and never put anything sharp near the lens to avoid scratching it.
Another home method you can use to clean out your CD player is air. If you have an air can for cleaning out computer keyboards, you can use that to spray your open player from a distance. Otherwise, you can use a hand-held fan or hair dryer on a cool setting to blow some air into the player from a short distance away. Sometimes the air is enough to knock any dirt or dust loose from the player or lens. If all else fails, try some common CD player cleaners sold online or at your local electronics store before taking your player in for repair or replacement.