Can someone please tell me how to write music that builds up and then bursts into a killer riff? I'm writing a song and the building up part sounds good but every time i try make a heavier riff part burst out it sounds out of place.
Could some help me with this?

I'm also wondering about how to change from a heavy part to an acoustic part that i've alreadyvwrote. Can anybody explain this?

This is a bit of a touchy subject. After all, who's to tell you how to write your own music? Someone's impression of an epic buildup may vary from someone else's. But I'll take a stab at this one, because I think I might be able to at least get you going in the right direction (maybe; I'm not very good at explaining things).
A good way to build up into a sweet riff is to simply speed up. You start a speed increase, then you build up the drums from quarter notes to eighth notes (or whatever) and basically get louder and faster. Then it'll get to a certain point where it'll basically "burst," as you say, and then you can insert whatever sweet riff you have.
To go from that into a softer acoustic part, do the opposite. Slow down. I actually have an example for this one. "Orion" by Metallica, right before the massively awesome interlude, there's a slow-down.
These are two very simple, generic suggestions, but they're a start I guess. I can't seem to think of better examples at the moment. Sorry I can't help you more.