We study the minimal length elements in some double cosets of Coxeter groups and use them to study Lusztig's <i>G</i>-stable pieces and the generalization of <i>G</i>-stable pieces introduced by Lu and Yakimov. We also use them to study the minimal length elements in a conjugacy class of a finite Coxeter group and prove a conjecture in [M. Geck, S. Kim, G. Pfeiffer, Minimal length elements in twisted conjugacy classes of finite Coxeter groups, J. Algebra 229 (2) (2000) 570600].