1<<AINpin shifts left 1 AINpin positions, for example
1<<0 =0b00000001
1<<1 =0b00000010
1<<6 =0b01000000
~ is Ones compliment , it actually inverts the bits , 0 become 1s and 1s become 0s so
~(1<<0) =0b11111110
~(1<<1) =0b11111101
~(1<<6) =0b10111111
DDRA&=~(1<<AINpin) is the same as DDRA= DDRA & ~(1<<AINpin).
When you AND any bit with 1 it keeps its value, when you AND it with 0 it becomes 0
DDRA &= ~(1<<0) is the same as DDRA= DDRA & 0b11111110, this will clear (set to 0 bit0 of DDRA) and all other bits will keep the value they had
DDRA &= ~(1<<6) is the same as DDRA= DDRA & 0b10111111, this will clear (set to 0 bit6 of DDRA) and all other bits will keep the value they had
on the other hand DDRA=0x01 will force the value 0b00000001 , it will write these values to each bits of DDRA
Alex