It is possible to switch, but don't depend on it. First - it depends on your funding. If you match thru carms and are in a fully funded position, then you could theoretically switch and take your funding with you. However, if you match to fam med then you only have 2 years of funding and wouldn't be able to switch into anything else. If you match to a 5 year royal college program, then you could switch to another 5 year program or to a 2 year fam med program.
In order to switch, you have to apply to the program you want to switch into and they have to accept you, then you have to convince your current PD to let you out of your program (when you accept a position it's basically a contract and they don't have to let you out of it).
Knowing people who have done it, it is a long stressful process and there are no guarantees.