No, an ostrich does not hide its head when it is frightened.  According to this old belief, the ostrich hides its head in the sand to escape danger, because it feels it is safely hidden.

What this tall bird actually does when it sights possible danger is lie flat on the ground with its long neck stretched out, thus producing a low profile.  And enemy may not be able to see the ostrich when it is in this position.

If danger comes too near, the ostrich runs off at top speed.  Although an ostrich cannot fly, it can run as fast as 40 miles an hour, and can easily outrun most of its enemies.–Dick Rogers