A random site generator uses an algorithm to select and display websites from a pre-curated database of URLs. When you click the generator button, it randomly picks one website from its collection and redirects you there. These generators typically categorize websites by type, content, or purpose to ensure users get relevant results within their interests.