To apply an attribute to a segment first create your custom attribute in Settings > Custom Attribute.
Once you've created your attribute, click in to Audience > Segments. Click on the button that says "Take Action" next to the segment you wish to apply an attribute to.
Scroll down to "Analyze and Organize your Segment" and click the "Apply Attribute" button in the Actions modal.
Select the attribute you'd like to apply from the drop-down list. Add the value (if applicable) for the attribute.
*Remember: If your attribute doesn't already exist you will first have to create your attribute in Settings.