It still has the "buy" button, but once you tap on it it will tell you that you have previously purchased the app and ask if you want to reinstall.
There's no way Microsoft would charge twice for the same app, no matter on which devices you have installed. Unless the developer has published the same app multiple times (like one for each country with specific translations or features enabled/disabled...) - in this case, they are considered different apps so you might actually have to pay twice.