To apply an attribute to a segment first create your segment in Settings > Custom Attribute.
Once you've created your attribute, click in to Audience > Segments. Click the gear icon next to the segment you wish to apply an attribute to. Click "Actions" in the drop-down menu.
Click the "Apply Attribute" button in the Actions modal.
Select the attribute you'd like to apply from the dropdown 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.