This camera is an old-fashioned camera that Muggle-born student Colin Creevey used to take pictures of his life at Hogwarts School of Witchcraft and Wizardry to show his father.
Although most devices powered by electricity do not function in the presence of magic, the camera still worked at Hogwarts, since it was able to run off the magical atmosphere instead of its batteries.
When Colin looked at Salazar Slytherin’s basilisk through the camera’s viewfinder, it saved his life since he did not look directly in its eyes. Colin was left petrified, and the film inside was burnt and melted.

Picture of Colin Creevey from Harry Potter. Copyright Warner Bros.