Both "beats" and "tempo" are aspects of rhythm. Rhythm has everything to do with how music moves through time. So beats can mean when a sound/note plays in a particular timeline, and tempo can mean how fast that timeline moves forward. Both have to do with the timing of elements within a piece of music. Oftentimes, the idea of "the beat" of a song is used interchangeably with "the rhythm" of a song, because it makes the concept of rhythm easier to get your head around.