Most likely you are interested in a very simple approach that will run on your Pi. Some of methods I am going to mention are possible to run in real-time with not-badly written C code. Probably you will start with HMM's and MFCC's - it's not a bad idea for the beginning, but as you will see - people developed more advanced methods for such application. Choice of features is rather obvious, pre-processing and Machine Learning is up to you - this will have biggest impact onto your results.
Here is a list of some papers you might find interesting. All of them are targeting cough recognition problem and are applicable to other types of sounds.
HMM-like approach:
Takahashi S., et al. - Cough Detection in Spoken Dialogue System for Home Health Care
Shasha Le, Weiping Hu - Cough sound recognition based on Hilbert marginal spectrum
Matos S., et al. - Detection of cough signals in continuous audio recordings using HMM's
Chunmei Z., et al. - Recognition of cough using features improved by sub-band energy transformation
Hu W., et al. - Cough sound detection bases on EMD analysis and HMM recognition
Karhunen–Loève-like approach:
Liu Y., et al. - A cough sound recognition algorithm based on time-frequency energy distribution
Decision Trees-like approach:
Larson. E, et al. - Accurate and Privacy Preserving Cough Sensing using a Low-Cost Microphone
Martinek J., et al. - Distinction of cough from other sounds produced by daily activities in the upper airways
SVM-like approach:
Jia-Ming L., et al. - Cough signal recognition with Gammatone Cepstral Coefficients
And this is absolutely lovely ;)