The terms are each broad in their scope. For instance, the spatial frequency of a pattern of dots refers to number of instances of the pattern over the distance in which the pattern repeats. In general, the spatial frequency of some pattern, be it a wave or a pattern of dots, or lines on a beach, or pages in a book, refers to the number of occurrences per distance between occurrences of the pattern itself. In other words,
$$
f_\text{spatial} = \frac{\text{number of occurrences}}{\text{unit-distance}}.
$$
Similarly, the temporal frequency of something refers to the separation in time of the event. In any song we hear, there is a temporal separation between the beats. There is a temporal frequency to the sound of waves crashing. The definition is analogous to that for spatial frequency:
$$
f_\text{temporal} = \frac{\text{number of occurrences}}{\text{unit-time}}.
$$