Download and install Cockos' Reaper. Reaper is free open-source software for music composition. While Reaper is free to download and use, you must purchase a license from Cockos if you intend to make commercial music.
Download and install free VST, or Virtual Studio Technology, from VST Planet to use in Reaper. VST Planet offers high-quality free-to-use virtual instruments such as drums, bass and synthesizers. Place your VST instruments in a single folder and label it "instruments."
Open Reaper and set the program to read VST instruments from the folder you created. Select Options > Preferences > Plug-ins > VST from the drop down menu. Once in the VST dialog click "Add" and select the Instruments folder you created from the browser.
Add a new track for your drums by selecting Track > Insert New Virtual Instrument on New Track, then selecting your drum VST from the dialog. Select Insert > New Midi Item and double click on the new item created in Reaper's timeline. Insert notes by double clicking in the piano roll.
Insert bass, keys and pads by selecting Track > Insert New Virtual Instrument on New Track and choosing the appropriate VSTs. Select the sounds for each you wish to use by double clicking on the track to open the VST interface. Compose the notes for your beat as you did the drums. When you are happy with the loop select File > Render to convert it to a wave format file you can share and play.