While there are already lot of questions on this topics here on Mathematics (1,2, 3) and several (too many perhaps) Wikipedia pages on the subject (a, b, c), they all involve concepts that I am not familiar with (e.g. Turing machine, strings, Hamiltonian circuits, the concept of mathematical proof itself..), so I still have lot of confusion.
Let me see what I understood and what I still miss.
A problem is given by a set of rules that given an input returns true/false, i.e. the input satisfy or not the rules of the problem.
A problem is classified as of class P if it exists at least one algorithm that given some input and a set of rules, returns either an output that is guaranteed to satisfy the problem or a declaration that no feasible outputs are possible with that input, and this algorithm has a computational "cost" (whatever this is) that growths in polynomial way with the size of the inputs.
FIRST doubt: the problem or the algorithm itself is of "class P" ?
A problem is classified as of class NP if at least one algorithm exists that given an input (for example obtained as result of the algorithm above) and a set of rules it can verify if the rules are satisfied with a computational "cost" (whatever this is) that growths in polynomial way with the size of the inputs.
SECOND doubt: what is the relation with deterministic/non-deterministic here ?
So the "P = NP" or not refers to the possibility that problems exists whose rules can be verifies in polynomial time (NP), but no algorithm to provide solution to the rules (given an input) can exist in polynomial time (P ≠ NP) or at the opposite that all NP problems must have an (perhaps yet undiscovered) algorithm that find feasible solutions in polynomial time (P = NP).
THIRD doubt: what are "NP-complete" and "NP-hard" problems ?
The Wikipedia entry is a bit cryptic: "But NP contains many more problems,the hardest of which are called NP-complete problems. An algorithm solving such a problem in polynomial time is also able to solve any other NP problem in polynomial time." How can algorithm devised for a specific problem can be used to find solutions to any problem ?