How can I add tags or groups in Apple Contacts?
In the macOS Contacts app, you can create a new Group by either going into File → New Group or pressing ⇧ shift ⌘ cmd N.

To add a contact to that group, simply drag them from the main list to the group in the left side-pane. If that pane is hidden, you may make it visible by going into View → Show Groups or pressing ⌘ cmd 1.

As of iOS 10.3, it is not possible to manipulate groups in the iOS Contacts app, only filter by groups.

You can perform these operations using the web apps at iCloud.com, although doing so using Safari for iOS is very difficult.