Generally the adverb modifies the verb or verb phrase right next to it (in front or behind). So
“I do not understand completely” and “I do not completely understand” are equivalent in meaning in that “completely” modifies “understand”
“I completely do not understand” has a different meaning because “completely” now modifies the entire “do not understand” rather than just “understand”
There is no absolute rule, but one simple way to remember this is to place the adverb next to or as close to the verb that it modifies as possible, unless you want it to modify more than just the verb.