How to add .h file in library
In you Arduino Sketch folder there is a folder called Libraries, create a folder there and put your header file in that folder and restart the Arduino IDE.

For example (PC):

Documents/Arduino/Libraries/ultrasonic/ultrasonic.h


You can now use it in all your projects.

If you only want to use with a particular sketch, place in in the same folder as you  sketch and restart Arduino IDE.