Strictly speaking, pores are the holes through which sweat is secreted. Hot water does make them open, as part of the usual thermoregulatory response, but this plays no part in the closeness of a shave, because the hair follicles are entirely separate from the pores.
However, what hot water does do is soften the actual beard hair itself. Many shaving guides recommend washing well with warm water and soap before applying the razor. 'Proper' wet shaves at a barbers will often start with a hot towel being applied to the face, which really softens up the beard. A softer beard means the razor can cut it more easily, resulting in a more comfortable shave.
Whether this means a closer shave is probably debatable and dependent on the sharpness of the blade. A new blade will probably slice through the beard anyway, but an older blade needs a bit of help. In any case, the increased comfort alone is worth the effort.
The key to a comfortable shave (during and after) is retention of moisture as much as possible. Shaving not only removes hair, but also a thin layer of skin and the oils that keep it moist. Splashing with cool water after shaving will cause the pores to close, with the benefit being reduced moisture loss through them. Moisturiser or balm should then be applied to replace lost oils.