There are a number of conditions that can cause your nails to thicken and change colors.
First, you may have a fungal infection. Further, there are other types of infections that can cause this. As far as the thickening this is usually a combination of infection plus either acute or chronic injury to the nail. Keep in mind that if you have deformity in your toes or feet the pressure from the toe box of the shoe can cause repetitive micro-trauma and lead to thickening. Over the counter products tend to work best on minor infections with limited involvement of the nails. Rarely do the OTC products help thickening.
Your best option is to come in for an evaluation of your foot and toenails so we can make sure the problem is properly evaluated and diagnosed prior to treatment. Many patient was time and money on ineffective and improper treatments, as well as delaying proper treatment which allows progression of the problem.