Basically, you must apply "digital" pulses to the ultrasonic transducer.
For maximum signal strength out, excitation pulses are typically one-half the cycle time of the transducer's resonant frequency. So, for a 5MHz transducer you would want something like 100ns-wide pulses.
The excitation pulses must be appropriately shaped. This often means that you can't simply use an unbuffered digital io to drive the transducer. You will probably have to take into account the combined characteristics of the transducer and any transmission line between the driver and transducer.
If you will use a single transducer to both transmit and receive, the driver must become "transparent" when it is operating as a receiver. In the simplest case, in which something like a digital ttl/cmos output is driving the transducer, the driver would tri-state when the transducer is receiving. Obviously this becomes more complex when the driver is more than a trivial digital output.