What happens when NaOH dissolves in water?
Simple. You get NaOH solution. The solution thus obtained is alkaline in nature whose normality depends upon the gram equivalent weight of NaOH dissolved. NaOH being polar in nature is highly soluble in water.
Sodium hydroxide in a pure form is a solid, so you cannot dissolve anything in it. Normally, NaOH is used as an aqueous solution. But salicylic acid dissolves in water, so the presence of NaOH in the water is irrelevant to the solubility of salicylic acid. It is the water, not the NaOH, that dissolves the salicylic acid.