Mine is a different background - I studied as an aerospace engineer so I've had the advantage of being forced to solve problems quickly, efficiently and correctly. In my degree we did matlab to solve complex math problems. Then after this I became a software engineer (self-taught). So a mix.
In order to solve problems you need to be able to identify exactly what the problem is. This sounds easy, but can elude people for a long time, even those who are versed in problem solving. However, the idea is to break the problem down into it's fundamental components and then through careful observation, analysis and deduction the solution can be found. Problem solving is a process.
The more knowledge gained in a certain language can make this easier but that doesn't mean it can't be done for those who are brand new to a language, or anything really. The experience you already have in life and in other programming fields can be used to understand how it could be done in a different environment and from this derive an appropriate approach to the problem being faced.
An example, if its a bug:
As for complex problems its important to follow a similar process where you identify what you want to achieve (observe), then understand all the tools at your disposal in order solve the problem (analyse) and then break down the problem into smaller and smaller parts with corresponding methods/tools to solve (deduce) so you can start crossing them off your list, on the way to completely resolving the issue.
Observe, Analyse & Deduce.