In the first part of this article, the geometry of Lie algebroids as well as the Moyal-Weyl star product and some of its generalizations in open string theory are reviewed. A brief introduction to T-duality and nongeometric fluxes is given. Based on these foundations, more recent results are discussed in the second part of the article. Closed string theory with flat background and constant H-flux is analysed. Focussing on the target space and the local appearance of the various fluxes, an algebra based on vector fields is proposed, whose structure functions are given by the fluxes. A proof is given for a special Courant algebroid structure on the generalized tangent bundle, where the fluxes are realized by the commutation relations of a basis of sections. It turns out that Lie algebroids are the right language to answer this question positively.