Wave form analysis ML algorithm
First, for your problem you can read https://www.sciencedirect.com/science/article/abs/pii/S0031320310004619
Unfortunately there are no closed answers for these questions... One of the major tasks of a ML engineer is to decide what algorithm to apply and what features from the original data to use to solve a specific problem... Both decisions affect the other. Almost every single decision in ML is strongly related to others... Other important things to bear in mind are the amount available data, hardware constraints and so on...

how do I know what data to provide a machine learning algorithm?

In classical ML, the engineer has to decide which features to compute. My advice is consulting expert's papers and contributions that solved similar problems and take advantage of their expertise. Features are dependent on the specific problem, domain and data. In audio processing there are quite well known: MFCC, Spetrograms...
In audio, a typical approach is to divide the audio signals in overlapping frames and compute the features over them. In that way, the evolution or dynamics of the audio features can be analysed over time. Taking the spectrogram is an example of that, it can help analyzing the evolution of the frequency components.
Data preprocessing is really important too: audio can be normalized or filtered as a previous step to feature computation.
In Deep Learning, neural networks try to compute the best features for you. However, a raw audio signal is rarely directly fed into a ANN. Typical procedure here is to compute the spectrogram (which can be interpreted as an image) and use Convolutional Neural Networks or Convolutional LSTM networks, or even Transformers.

what sort of machine learning algorithm would I use?

Depending on the problem, there are state of the art methods for image classification, detection, speech recognition...
The first thing you need is to really well define what do you want to do, knowing the problem... then, once again visit other scientists approaches.
Once you have a clearer idea, if you have hardware and computing time constraints, you need to figure out what kind of solution will adapt to them.
Theses comments may not seem very clarifying, but you dropped two really broad and difficult to answer questions.