Example of layer 2 device?

Switches are generally considered layer 2 devices, but many are capable of operating at layers 3, 4 or higher.

Most hubs are amplifying the electrical signal; therefore, they are really repeaters with several ports. Hubs and repeaters are Layer 1 (physical layer) devices.