Mainly, if we have one thing and we want to divide it into separate parts, then we use 'bölmek'.
If there are two or more things and we want to separate them from each other, then we use 'ayırmak'
Bu ülkeyi bölemezsiniz. You can not divide this country.
Anneyi çocuğundan ayırdılar. There is mom, and her child and somebody separated them.