T-coil is a function of the phone hardware. It requires the speaker to be rigged in a specific manner to allow it to inductively couple with the coil in the hearing aid, though there exist telecoil adapters such as the Music Link for devices without such support.
You can often find listings of what devices offer what kind and level of support for hearing aid compatibility on carrier sites, such as these listings from AT&T and Verizon. The CTIA also has a more general database (Though it seems to be experiencing issues at the moment) for finding devices with all types of accessibility features, including hearing aid compatibility, as well as information on accessibility services offered by carriers, and more.
The Global Accessibility Reporting Initiative operated by the Mobile Manufacurers Forum offers a similar service, though more global in scope, for finding devices with accessibility features
The M and T indicates whether it supports Acoustic coupling (which tinkers with the sound to allow a hearing aid to pick it up more easily) or Telecoil respectively and the number indicates how good the support is, on a scale of 1 to 4, with 4 being the best (though ratings of 1 and 2 are pretty much never seen). As a general rule, telecoil is just about always better than acoustic, regardless of the numbers for each.