Substituting a line into a plane equation reduces a spatial intersection to one scalar equation.
When d≠0, the intersection parameter is (h−p)/d. If d=0 and p=h, every point of the line lies in the plane. If d=0 and p≠h, there is no intersection. The signed distance here is z−h because the plane has unit normal (0,0,1).
Parallelism is a statement about direction, not automatically about disjointness.