How can a Turing machine run another machine for an infinite amount of strings?
The technique is knows as dovetailing. The machine $P$ keeps a two-dimensional tape and uses the following algorithm:


Run $M$ on the first string for one step.
Run $M$ on the first two strings for one step.
Run $M$ on the first three strings for one step.
...


(We imagine that all possible strings are arranged in some arbitrary computable order, say $\Lambda,0,1,00,01,10,11,000,\ldots$.)

Each simulation of $M$ runs on its own "row" of the two-dimensional tape of $P$, which also stores the location of the head and the current state. (A two-dimensional tape can be simulated by a one-dimensional tape.)

If $M$ ever halts on one of the strings, then $P$ halts. Therefore $P$ halts iff $M$ halts on some input.