Choose your first sample. You can use any digital audio file, just drag the file onto an empty track in Logic. Zoom in on it until you see exactly where the bar that you want to use begins, and cut the audio object at that point. Then zoom in on the end of the bar, so you can see exactly where the segment you want ends, and cut again.
Delete the rest of the song, keeping only the segment you want to use. Drag the audio object so that it starts exactly at the beginning of a measure in Logic.
Either adjust the tempo of your song to match the tempo of the drum sample, or adjust the drum sample tempo. To do the former, increase or decrees the BPM in your main transport bar until the measure lines along the top of the "Arrange" window match up with the length of your sample. To adjust the tempo of the drum loop, highlight a measure along the top of the "Arrange" window so a one-measure-long green block appears. Then highlight the object, click the "Audio" tab at the top of the "Arrange" window, and click "Adjust Region Length to Locators."
Repeat steps 1-3 for each additional sample that you add.
If you are working with melodic or harmonic samples, adjust the pitch of a given sample by clicking on the track, clicking one of the empty inserts to the far left, scrolling to "Pitch" and selecting "Pitch Shifter II." Then raise or lower the pitch of your track until it harmonizes the way you want it to with the rest of the music.