Amazon Interview Question

How do heaps work? What's the difference between BFS and DFS?