Use for when you know how many iterations you need or when iterating over a collection. Use while when you don't know in advance when to stop.
# for: known iterations
for i in range(10):
print(i)
# while: unknown iterations
while user_input != "quit":
user_input = input()
for loops are safer because they can't accidentally become infinite. The range or collection determines when they end.
while loops are more flexible. You control the condition completely. But you're responsible for ensuring termination.