Play scales frequently. Whatever your instrument, playing scales will benefit you in several ways. Use major and minor scales first. Learn all twelve major keys and the relative minor keys in every position on your instrument. These scales serve several purposes. They form the basis of almost all theory exercises. Scales help train your ear to hear the music. They teach you where notes are on your instrument in relation to the music staff. Playing scales helps improve your playing ability on your instrument.
Practice harmony construction with the scales you learn. Harmonies, or chords, are built from musical scales. Any good music theory book will discuss building chords. Reference to these chord constructions are in terms of scale degrees. The first, third and fifth notes of any major scale make a major chord of the same name as the scale. Simply flatting the third note turns the major chord into a minor chord. Practice writing chord constructions on blank music staff paper to reinforce building chords.
Play the chord constructions you've written on your music paper. Playing arpeggios (playing the notes of a chord one after the other) will help train your ear to recognize intervals (the distance between notes). Playing arpeggios will also enhance your technique on your chosen instrument.
Combine your scale and chord theory with music composition exercises to build your writing skills. Practice writing within specific keys first, then experiment by adding notes outside the key you're writing in. As time goes on and you begin to hear the music you write, you will be able to recognize the way notes work together and how you can combine them to create your own original music.