"Do you want to be my boyfriend?"
Translation:Willst du mein Freund sein?
It's because the main verb in the sentence is sein. Wollen is an auxiliary verb supporting it.
Here is a link just talking about the German language.
Interestingly enough, the Wikipedia page on auxiliary verbs, if you want more info, also has some German in its explanation.
Since it's a question, the main verb (willst) takes the first position instead of the second. The first position which would have had du in it is now in the second position (they just changed places). Because the sentence uses another verb (sein which is "to be"), it gets kicked to the end. The rest, not that there is much, would just follow the standard linguistic typology for German. I think a lot of people remember the acronym STOMP for subject, time, object, manner and place.
If this had been the statement "You want to be my boyfriend." instead of a question, it would have been "Du willst mein Freund sein." As you'll notice, the extra verb still gets kicked to the end and the 2nd position is taken up by the first verb as it normally would.