If I buy an app in the App Store, will it work on future major releases or will I need to repurchase it? I usually buy Apps in the Mac App Store and iOS App Store but I've always had the doubt, when I buy it, will the app be available in the future for the next releases or not?

I never brought an App two times because of a major release, but is it possible?
Yes it is definitively possible. As of now, Apple does not enable the developers to publish paid updates for their software. Due to that, developers sometimes release different versions to buy from the App Store.

E.g. have a look at http://itunes.apple.com/de/app/photoforge/id314173066 and http://itunes.apple.com/de/app/photoforge2/id435789422