depends on what board you get. Boards like the triton and pantom have sounds builtin including drums that you can use to make beatz. Boards like the ones i mentioned also come with a 16 track sequencer that will allow you to step record or record to patterns. then you just stack your patterns and arrangements and come out with a track.
If that is what you want make sure to get a board with a built in sequencer.
another advantage of getting a keyboard is the builtin arpeggios that can help you out if your not very familiar with notes and chords etc etc etc.