A computer doesn't have trouble doing anything; it does precisely what it's programmed to do. It is efficient in doing a task if and only if we come up with an efficient algorithm for it.
In that regards, we have a whole hierarchy of less and more efficient such tasks. On the bottom of the hierarchy is the problems where the machine just finishes after a couple of steps. Then there are an infinite hierarchy of problems solvable in logarithmic and polynomial time, followed by an infinite hierarchy of problems only solvable in exponential time followed by an infinite hierarchy of problems only solvable in super-exponential time (and so it goes) until you reach the limit of algorithms.
Then you get to the tasks for which there provably cannot exist any algorithm whatsoever for solving them, which is an infinite hierarchy of more and more undecidable problems. And we still have only seen a tiny tiny tiny part of all problems that exists. The majority of the problems lie above all these hierarchies.
Summing up, computers run algorithms. Some tasks have efficient algorithms, and some don't (and for some, we don't know).