Your building probably uses simple pin tumbler locks, which are adequate for most residences. Pin tumbler locks work by having several pins lined up inside the cylinder of the lock in pairs and pushed down by a spring. When you insert the key, you elevate the pins so that the shear line between the two lines up with the opening of the lock core, allowing the cylinder to spin and the door to unlock.
How much the pins have to be elevated is what constitutes the lock’s secret, and it is the reason why your door key has ragged edges.
Master keys in such simple systems work by having three sets of pins inside each gap of the lock body instead of two. Which gives the door two secrets; one for the individual homeowner’s key, and one secret that opens for the master key. It is that simple. If you need more keys, you can always find key cutting Halifax from companies like Stuarts Hardware.