Joseph was betrothed to the Virgin Mary at the time the Angel Gabriel visited her to announce the conception of Jesus. Later an angel appeared to Joseph in a vision telling him to take Mary as his wife because she had conceived by the Holy Spirit (Matthew 1: 20).
Jesus belonged to the tribe of David through Joseph. Traditionally Joseph is presumed to have died before Jesus' ministry started. He was a carpenter by trade, and is often represented as an old man on the strength of apocryphal lives written in the late Middle Ages when he became a cult figure.
His attribute is the staff which miraculously broke into blossom as a sign that he was chosen to marry Mary.