Like other Japanese kosoado pronouns, you can divide them like this:
- kocchi こっち
This side. My side.
- socchi そっち
That side. Your side.
- acchi あっち
That side over there. His side.
That way over there.
- docchi どっち
What side? Whose side?
And they... wait a second. These meanings are exactly like the pronouns kochira, sochira, achira and dochira, aren't they?! How did this happen?!
Kocchi vs. Kochira
Well, turns out kocchi, socchi, acchi and docchi are nothing more than casual, shortened forms of those pronouns over there.
So, though most of the time you'll see a character say kocchi, the proper, formal way to say it's kochira. Though they say socchi, the proper way is sochira. For acchi, it's achira. And docchi, it's dochira. But do note that anime characters never ever say those, only because they speak casually all the time, never formally.
Except for phrases in which formality is important, such as dochira-sama desu ka? どちら様ですか？, "who are you?" you can use these pronouns instead of those pronouns and vice-versa. So much that I'm just copy-pasting their examples as they work pretty much the same way and I think it illustrates the point better.
- kocchi de nantoka suru こっちで何とかする
We'll do it somehow. We'll fix it somehow.
(this means that you, socchi, shouldn't worry about it as we, this side, will manage)
- kocchi e douzo こっちへどうぞ
Come to us.
- kocchi ni mukatte kuru! こっちに向かってくる！
(the enemy, monster, whatever) is coming at us!
- socchi wa dou desu ka? そっちはどうですか？
How are things there?
(here we're talking about your side, the side of the listener)
- acchi wa watashi no tomodachi desu あっちは私の友達です
Those are my friends.
(those, on that side, over there, are my friends)
- okane to shiawase docchi ga hoshii desu ka? お金と幸せどっちが欲しいですか？
Money or happiness, which do you want?
As you can see, it's literally the same thing with literally the same translations.