The most normal way to create a used attribute is via the User tab of the Document Inspector. See the link for the configuration options offered.
A more recent way is by specifying the name of an undefined attribute in the Add Key Attributes pop-up on the text pane of a selected note; the the link for how the process works. Note that this ‘quick’ method only allows choosing a data type. To fully configure an attribute the Inspector (above) needs to be used.
Some drag-drop methods of importing data (CSV, OPML, etc) will create attributes for column heads that don’t have a matching system or user attribute. As with the last method above it may not create the desired data-type so it may be necessary to do further configuration via the Inspector.
Unless doing quicky-and-dirty tests, I’d advised using the Inspector method as it offers most control. For a long term document, not least is adding a note as to the purpose of the attribute; months latter the attribute name may prove less intuitive than imagined (or so I’ve found!).