If you want your sub bass hit to be an actual musical note, use a real bass (ideally electric), MIDI controller or a sample. If you record electric bass, record one or more low notes where you want them. If you have a MIDI controller, use a bass or sub bass synthesizer sound, many of which can be downloaded online. GarageBand has a built-in sub bass synth sound.
If you want your sub bass hits to be purely percussive, use a close-miked live kick drum, a MIDI kick sound or a sample kick. The 808 drum machine might have the most widely used and distinctive sub bass and kick sounds, which have a wide range of tonality. If you don't have an 808, you can find 808 samples somewhat easily online.
Equalize your sub bass so that it fits in the mix. The most common problem with sub bass is that it can clash with other low tracks, such as a bass line or kick drum. To avoid a muddy low end, cut the frequencies of your competing non-sub bass track from around 80 Hz and lower. Boost your sub bass around 80 Hz, while cutting out all higher frequencies.