Apple interview question

How does a pinhole camera work? What is its limitation?