An ultrasonic pest repellent is designed to emit a very high frequency sound that pests cannot tolerate. It is a device that is usually plugged into a wall. Studies have been conducted to see how effective this type of repellent is, which have produced varying results. For example, these studies showed that they are not effective against spiders and ants. They also proved to have very little effect on cockroaches and, revealed that pests can actually get used to the noise so that it no longer deters them.
Although studies have shown these kinds of results, there are those that say ultrasonic pest repellents work very well. This shows that if you decide you want to try them, do a bit of research first, read consumer reviews to see what they say and make your decision from there. Keep in mind also, that the high frequency sound will be blocked by furniture and walls which will render the repellent ineffective.
In some instances (when an infestation is really bad) you may need to consult a professional or choose a pest repellent that has been proven to be very effective.