It's a gentle apology for not liking something. For example, if someone invites me to come to a concert of music by Schoenberg and Webern, I might say "No thanks, atonal music is just not my cup of tea." I am trying not to hurt my friend's feelings by saying that atonal music is bad, or that my friend is showing bad taste in liking it. I am saying "it's just my own personal preference."
We use this expression in the United States, and we always say "tea," never "coffee"--even though coffee is much more popular!
For some reason, the expression "not my dish of tea" is also used. I've tried Internet searches to understand exactly what "dish of tea" means but there isn't any real agreement.