However, they just dictate the solution of a particular problem. I wonder if there is a resource, website or any material, that doesn't only give away the code, but also explains the solution thoroughly ?
The problems in the Project Euler site at least would cover problems based on background in different areas such as discrete mathematics, number theory, data structures, general theory of algorithms, as well as the knowledge of general problem solving skills. To find more explanation about a specific question, I suggest that you be familiar with the subject of area the questions. For example, to solve the problem "Find the 10001st prime", you need to know about prime number properties which is usually discussed in Number Theory and/or Discrete Mathematics and then use this knowledge to come up with a good algorithm.
Good books on the above subject areas are too many to list (e.g. Problem Solving and Programming Concepts (9th Edition)), you could easily search for them by subject name such as "Problem Solving", but then again, good is somewhat relative and depends on your background and your favorite programming language.
Wikipedia offers good but sometimes complex explanation for most of the above subjects for example prime numbers are discussed in Wikipedia-Prime Numbers and Wolfarm discusses the subject at wolfram Prime Numbers. StackExchange specialty sites should also be consulted for fruitful discussions. This link may be helpful Algorithm Tutorials on Stack Overflow
ACM offers some free books/chapters on: ACMSolver
I hope this helps.