Is hardware device is used as a firewall?

firewall is not a part of hardware.

its a part of software(operating system). its used to a computer for safe your document from viruses & hacker.