。
The animals were frightened by the thunder.
Literal
Thunder [object-を] hear-and animals [topic-は] became-afraid.
怖がる ('to act frightened / show fear') is the verbal form of 怖い with the ~がる suffix, which converts an adjective describing an internal state into a verb describing observable behavior. You can only directly describe your own feelings with 怖い; you must use 怖がる for others' feelings.