The short answer is it doesn't "convert", the voltages are the binary (or a representation of it). Just like if you write a number on some paper the marks are a representation of the number, or count on an abacus the stone positions are a representation of a number.
Binary is a number system, just like decimal (or octal, hexadecimal, etc)
While decimal (base-10) has 10 symbols (0123456789) binary (base-2) only has two (01)
The sequence 10 in any base means the base to the first power, so in decimal 10 means 10^1 = 10, and in binary it means 2^1 = 2. Following on, 100 in decimal means 10^2 = 100, and in binary it means 2^2 = 4. And so on.
To represent decimal using electronics would be possible but complicated, so they chose binary which can be represented by simple 0 and 1 (or on/off)
There were variations on this, like ternary (3 states) systems and of course analogue computing. Before transistors, there were mechanical punch card machines (google knows plenty, some very interesting reading if you have the time)
The earliest binary digital computers were made with real switches (electronic relays). The Zuse Z3 (1941) is an example:
After this vacuum tubes were used instead of relays (could switch faster with no moving mechanical parts), which performed the switching instead of relays. The ENIAC is an example of an early computer made with vacuum tubes.
Then in the 60's transistors arrived and soon after ICs. The transistors perform the same function that the relays/valves had in earlier machines, but were a lot smaller, faster and consumed less power.
The actual theory behind the basic way binary computer circuits work hasn't changed at all, just like we haven't changed the way we manipulate numbers in mathematics - algorithms improve but the basic rules remain the same.
So if you know how binary works, and you have a simple circuit capable of storing either a 1 or 0 as two different voltage levels (e.g. 5V and 0v), and other simple circuits that can perform simple logical functions like AND and OR, then you can combine them all to do more complex stuff.
Since all these binary circuits are just switches at the most fundamental, you can achieve the same thing with anything that can alternate between two states like mechanical/relay/valve/transistor/?.
To give an example of storing a number in binary, lets say we have 8 switches (what type they are isn't important)
A 1 is represented by 5V and a 0 is represented by 0V.
We want to store the number 123.
In decimal it is 123 = (1 X 10^2) + (2 * 10^1) + (3 x 10^0)
In binary it is 01111011 = (0 x 2^7) + (1 x 2^6) + (1 x 2^5) + (1 x 2^4) + (1 x 2^3) + (0 x 2^2) + (1 x 2^1) + (1 x 2^0)
So all we do is set switches 0,1,3,4,5,6 to 5V and switches 7 and 2 to 0V. This "stores" the number 123 in binary. This setup would be known as a "register".
If you want to know more about how the switches are combined to form more complex circuits get yourself a good book on digital logic or ask google.
This site doesn't seem to be too bad to start with.