An attribute join is used to append the fields of one table to another based on a common field. In order for an attribute join to work, the common field needs to be the same field type (e.g., string, numeric, etc.) and have identical formatting. The column names do not need to match in order for the attribute join to work.
For example, an attribute join could be used on the following fields (GEOID10 and ct10_id) to help append American Community Survey data to a shapefile showing Middlesex County, MA census tracts. The column names don't match, but the fields have identical formatting and the same field type (text). Once the attribute join is complete, the variables from the appended American Community Survey table can be visualized on the map by census tract.
A spatial join uses geographic proximity to combine two or more spatial features on a map. A spatial join can visualize target features that intersect, completely contain, fall within a specified distance, etc. of the join features.
The process for creating a spatial join in ArcGIS Online is similar to creating an attribute join.
Note: If your spatial join doesn't produce your intended results, check that you have your target and join layers in the correct order and that you selected the correct spatial relationship parameters.