system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: A subnet mask and what it's used for.
gpt
Here's a real ELI5 instead of the ELI30 the rest of the responses post:

Think of network packets like letters in the mail. Your address says which house you live at on the first line, and the zipcode tells the post office what general area you live in and what post office should service you. Subnet masks are the zip codes and tell a network device if you're in the same neighborhood or not. If you are in the same zipcode, mail doesn't need additional help to get to you. If you're in another zip code, your mail will go to the nearest post office to be routed appropriately.