Practice playing alternating bass lines. The alternating bass is the driving backbone behind ragtime music, and should be played using your thumb. Brush the strings alternately at an even pace. For example, for a bass line in C, pick the third fret (C note) on the A string, followed by the second fret on the D string (E), and repeat. You can spice it up by playing the third fret on the E string (G) in place of the C on the second and fourth time.
Add in some melody. This is where ragtime gets more complicated. In full ragtime, the melody often runs in a completely separate time to the bass ("ragging" the timing of the song), but during the learning process, it helps to keep it on-beat at first. Pluck notes on the first and third beats of the bar. In the example given above, this would fall on the same moments as you pluck the C notes in the bass line.
Learn standard ragtime chord variations. The notes you add in as melody in ragtime are often related to the original chords. For example, if you're playing a C chord shape in your bass line, you might add the third fret on the B string (D) into the melody, as well as the higher notes already present in the chord. Looking at ragtime tablature (tab) can give you a good idea of the notes often added into different chords when picking ragtime melodies.
Learn a ragtime piece. After you've gotten used to the basic elements that make up ragtime guitar, learning a ragtime piece is the next step. The melody is more complex and not as closely married to the bass line in real ragtime songs, but they follow the same general pattern. Listen to the song while you look at the tab to get a feeling for how it should sound. You will find that there are a few hammer-ons and pull-offs, but try to relax as you play. Getting the right overall feel is more important than hitting every note in perfect time.