learning a different dialect of your primary language

sorry if this is a 'just google it kind of question' but my mind is kind of mushed and i did google it but i didn't find quite what i was looking for.

i'm wondering about when actors learn dialects for their roles. where do they learn it from? i'm curious, because i'd like to learn other english dialects. i'm not trying to fool anyone and i'm not an actor, but i just really like them.

would there be any online resources for this?