You can convert a curve or shape (path) drawn using the Pen Tool into a selection. When created from a curve, the resulting selection will be closed using a straight line between the end nodes.
To create a pixel selection from a drawn line or shape (path):