You can use the Stroke command to paint a
colored border around a selection, path, or layer. When you create
a border this way, it becomes a rasterized part of the current layer.

To create shape or layer borders that can be turned
on or off like overlays and are anti-aliased to create softer-edged
corners and edges, use the Stroke layer effect instead of the Stroke
command. See
Layer effects and styles.