Question: I know this could be a strange question. But was there any algorithm ever found to compute an NP-problem, whether it be hard or complete, in polynomial time. I know this dabbles into the "does P=NP" problem, but I was wondering whether there were any particular instances when people were close to it. I've also heard about the factoring number problem being solved by a quantum computer by Shor's algorithm. Would this count as an algorithm which solved an NP-problem in polynomial time please ? Please do ask if you want me to clarify any parts in my questions. Thanks in advance.

Answer: 
By definition, if you were to find a polynomial time algorithm for an NP-hard (or NP-complete) problem, then $P=NP$. So, short answer is - no.

However, its possible to think instead of solving the problems fully, to [approximate a solution](https://en.wikipedia.org/wiki/Approximation_algorithm), or [to solve them randomly](https://en.wikipedia.org/wiki/Randomized_algorithm). There are attempts at attacking from those points of view, but they are not perfect at all. Randomization isn't known to help "as-is", and many NP-hard problems are known that are also hard to approximate (finding an approximation will yield $P=NP$)

There are also attemps taking a look at notions much *stronger* than the usual turing machine. For instance, the quantum computer can be considered one. Another obvious example is the non-deterministic turing machines, in which - by definition - $NP$ would be in polynomial time.
Strictly speaking, as the other answers explain, no. A polynomial-time algorithm for an NP-hard problem is not known nor expected to exist. But I think your underlying question is whether or not there are examples of natural NP-hard problems that are, in some sense, easier to solve than some other NP-hard problems.

There are several flavors in which you can quantify the hardness of NP-hard problems more closely. For example, there are problems that are extremely difficult to *approximate* (e.g., maximum clique) while some problems we can approximate arbitrarily close (e.g., knapsack). You could also have a look at *exact algorithms*: there are natural problems for which the best algorithms run in time $O^\*(2^n)$ and there is some evidence no algorithms faster than that exists, while others admit runtimes of roughly $O^\*(2^\sqrt{n})$ (e.g., planar problems) or even better. Or, you could look at *parameterized complexity*, where the idea is to do a two-dimensional analysis, i.e., take not only the size of the input $n$ but also pick some additional parameter, such as solution size or some structural parameter $k$. Then, some problems admit algorithms whose runtime is of the form $f(k) n^{O(1)}$, where $f$ is some computable function depending only on $k$, while some problems don't (e.g., $k$-clique).