In what language can such 3rd party application?
Your preferred language , Personally I Prefer Java
How will i communicate as in send out responses and accept inputs?
The communication method depends on the Operator Side . each Operator should define an interface for communication for EX :
TCP Socket ,Web Service , HTTP and etc .....
-Detailed Example : for Web Service
The Operator will ask you to define Web Service that accept some Parameters the most common needed parameters (MSISDN , IMSI ,Message).
When the mobile client initiate a USSD session on the mobile , the Request will be received in the Operator USSD Gateway then the operator will call the web service that you've defined it . then your responsibility is to handle the parameters and build your own flow to return a response for the Operator.
How will the do some other things?
The operator shall give you the full instructions on how to do the integration .
But the common points from your side is
2.Work Flow (As your Business ).