computer memory is split into two types, primary (ram) and secondary (hard/disc/flash drives). all memory is composed of binary 1's and 0's. binary is actually a base two number system, where each digit is called a bit. bits going from right to left have a value of 2^n where n is the position starting at 0 (1,2,4,8,16,32,...). bits are organized into larger groups, 4bits=1nyble, 2nybles=1byte(=8bits), 4bytes=1word, 1024bytes=1kilobyte, 1024kb=1megabyte, 1024mb=1gigabyte, 1024gb=1terabyte. binary is used in memory to store many kinds of data: integers, floating point numbers, characters, etc... the number of bits used to store data varies from place to place, but generally for integers and floats are the size of 1word(4bytes, 32bits), and characters are stored in ascii codes (1byte), or Unicode (2bytes). in all character codes each character is assigned a number. the difference between primary and secondary memory is that ram stores only the data needed by programs currently running, where secondary memory is used as storage. you can think of ram as your computers desk, and secondary memory as the filing cabinet. back to the ones and zeros, in ram binary is stored into sections called memory locations. when a program runs it splits a section of ram into three pieces, data, stack, and heap. the data portion stores the program itself and any constants, the stack is used by the program to keep things straight, like where it is and where it came from in the program (programs run like a choose your own adventure book kinda). the last part, the heap is used by your program to store different variables and the like. it's a rather complicated system but this should give you a general idea... kinda too broad to fully explain on here, and i figured I'd explain computer memory since someone else explained brain memory. i recommend you not ask such broad questions in the future :P
For the memory to be stored in the brain, the information must first be captured by the sight or the other senses so as to recall them. The brain can store memories for a short time and a long time depending on the sensory cortex areas and how it was transferred. You can read more about the brain on http://www.human-memory.net/brain.html.