Drums vary HUGELY depending on the style you are writing in.
Pop, rock, and most other modern genres use drums as a component of the texture- both a way to keep everyone in sync in the world of performance and a way to add a feeling of pace to the piece. Often, there are defined "acceptable" grooves for styles that should be used, and deviation is rare. However, drumming techniques can expand upon these grooves with things like rhythmic kicks (when the drummer emphasizes a beat or several beats to accompany a melody line) or stop time (when the drummer just does kicks and doesn't keep the beat going for extra emphasis), and of course, fills and solos. Fills generally function similarly to how a cymbal or bass drum roll would in an orchestra- accentuating a transition point or a change or providing interest in a moment where other instruments are out.
Interestingly enough, some modern drum grooves originated back in 19th century marching band music, which passed on some stuff through ragtime and dance music to hot jazz, blues, and eventually rock and other genres. Four on the floor? Look at a Sousa March. Snare on 2 and 4? Ditto. Marches in turn trace their way back through the realm of secular folk/popular music back through the ages.
If you're writing "art music"/"Classical"/"Romantic" orchestral, drums behave like rhythmic accents and often have reinforcing and contrapuntal roles, functioning more like the frosting on the cake rather than a layer of the cake. For example, a transition might be heralded by a cymbal or bass drum roll or hit, or a rhythm on brass might be punctuated or countered by a snare drum. Timpani might reinforce or counter a bass part to provide more interest and reinforce the strength of the root of the chord, especially if brass is in use (timpani were traditionally the accompaniment of brass in Europe since their introduction by the Turks during the Late Middle Ages). This approach uses less and more varied percussion than popular genres. If you listen to Romantic and Classical composers like Wagner, Brahms, Beethoven, Dvorak, Tchaikovsky, you will note they often have long passages (or even whole pieces) with little or no percussion or just plain use it sparingly (but sometimes go absolutely nuts).
Cinematic orchestral acts more like rock or pop music, with the primary weapon of choice being the taiko drum, sometimes supplemented by tenor drums and large hand percussion, often of the ethnic variety. Electro-orchestral blends will often use various types of glitch percussion and Orch. Rock will use rock grooves on drum kits. Cinematic generally tends to blend the two treatments of percussion and sits somewhere between a texture and an accent. Sometimes it reaches out and borrows aspects from the classical heritage, other times it borrows from its pop heritage.