An IP address uniquely identifies a device on a network, letting data actually find its way to the correct destination among potentially millions of other connected devices. Subnetting takes a large block of those addresses, assigned to an organisation as one contiguous range, and divides it into smaller, separately manageable sub-networks, letting a network split its available address space efficiently between departments, buildings or device groups rather than treating every address in that block as one flat, undivided pool.
An IP address splits into a network portion and a host portion
An IP address is really made of two logically distinct parts: a network portion, identifying which network a device belongs to, and a host portion, identifying that specific device within its network. A subnet mask marks exactly where that split happens within the address, and adjusting the subnet mask is precisely how subnetting works: moving the split point changes how many addresses get grouped into the network portion versus how many remain available to actually number individual devices, letting an administrator trade off a network's size against how many separate sub-networks it can be divided into.
Subnetting lets a large address block be organised and managed in smaller, logical pieces
Rather than managing every device on a large organisation's network as one single, undivided address pool, subnetting carves that pool into smaller sub-networks that can be assigned separately to different departments, floors or device types, each sub-network behaving as its own manageable, logically contained unit even though all of them ultimately came from the same original address block. This organisational separation also brings genuine practical benefits: traffic and security policies can be applied per sub-network rather than to the entire address pool at once, and problems on one sub-network can often be isolated without necessarily affecting every other device on the wider organisational network.
What we're still unsure about
That IP addressing and subnetting correctly identify devices and organise address space into manageable sub-networks is well established, thoroughly confirmed networking practice underlying the modern internet's basic addressing scheme. What's more genuinely a matter of ongoing technical transition is exactly how quickly networks worldwide are actually moving from the older, more limited addressing scheme to a newer one offering a vastly larger address space, since that transition has been under way for years but real-world adoption still varies considerably by network and region, and network engineers continue to manage both addressing schemes running in parallel rather than the transition being fully complete.
This sits inside IP Addressing & Subnetting, one of seven topics in Networking, one of seven domains in Computer Science, one of seventeen subjects the app can quiz you on.