The interior is a dimension onto itself. Basically it is a part of the same universe that has been seperated off through a scientific method (like a bubble inside another bubble) and then the equipment is "moved" into the new bubble via a "dimensional string" (never really explained in the shows or books, but guess its like a wormhole). Part of the equipment is obviously the space-time drive, but the majority is like a holodeck.
Why a holodeck? Because other than the needed equipment, people, and things brought in from the exterior real world, there are very few actual rooms within a TARDIS. The rest of the space is mathematically induced to allow for walls, doors, privacy, etc. In all likelihood a fractal-like formula is used, since this means that the pattern for a given wall can be repeated as many times as needed. As a direct result the "near infinite space" of the interior is limited not by power (in terms of energy) but in terms of "computing power". Rooms and objects can be added, saved, removed, deleted, or even jettisoned for thrust as either matter or energy. Rooms not used in a long time may be moved deeper into the ship or "saved" for long-term storage as data (personal objects should be kept in a primary room like the console room or workshop, as they may be degraded or lost if left in a random room and digitized for long-term storage).
Another misunderstood concept is that the TARDIS has more than one floor (cause it has stairs and elevators). All rooms are EXACTLY one-room tall, regardless of appearance. If you climbed stairs to the second floor in the console room and left the room, you would either return to the main floor of the console room, or find yourself in a different part of the ship. Stairs and elevators (when not clearly within a single larger room) appear to go up or down, but in reality they move you around vastly different areas of the ship. This is because of the fractal-like mathematics of the interior design (aside from furniture and the fixings like the color of bedsheets, every bedroom is identical to every other bedroom). As a result you could swear you are walking in circles, passing the same cargo bay, stairs, corridor, and intersection while at the same time swear that you have walked a perfectly straight line for a good quarter of a mile. (Sure, they re-use the same background sets for the effect, but that's how TV shows save money).
NOTE -- this may have changed with the new series, but the original conceptual framework that most older fans go by is that the ship has a fractal design, so "deeper" into the ship always meant "further from the exit/console room".
NOTE 2 -- the other concept is that there is basically only one main multi-floor room, with the console room at the top and the engines and power storage and power transfer rooms underneath the console. Everything else appears flat but is actually on an unnoticeable slant running around this main tower-like structure ... Though it can still appear that you are walking in a straight line, you are actually walking down a ramp around a coil, similar to the thread on a screw.
NOTE 3 -- the new season kind of refers to this as the "desktop theme". Since we know the interior is its own dimension, and it has more or less been described as a mathematically-induced dimension, and rooms can be moved/added/etc, all movement within the ship may simply be a matter of perspective. So you could walk a straight mile, swearing that you are somehow going in circles, and end up in a room three floors directly underneath the console room.
The "eye of harmony" (a captured blackhole) is mostly used to power the space-time drive, though a small amount of is power is converted into electro-static plasma or electricity or whatever the lights/computers/etc need. Originally the Eye of Harmony was hidden on Gallifrey and powered the various TARDISes through dimensional strings (meaning that a ship could be controlled remotely from Gallyfrey. You could override that control, but only to a limited degree. It was possible to completely cut that remote-control link, but it generally meant cutting off your main power supply too -- though you could also refuel at various time-rifts like the one in Torchwood's base in Cardiff, or find/install your own high-power energy source (meaning shorter trips with more frequent recharging stops. In the Peter Davidson 5th Doctor era the Master equipped his own TARDIS with its own power source in order to keep the Time Lords from tracking him via the power-link)
When the doors are closed, passage between the inside and outside becomes, for the most part, impossible. Often the TV show and books describe a police-box flying around, but that would really only apply in special circumstances. What you normally would see, if anything, would be a small probe-like device with various scanners/sensors (maybe the cube in the "flatline" episode is this device with all its vulnerable bits pulled in). Power is supplied to these sensors, and the data gathered, is transmitted via this "dimensional string". The "police box" is a hologram-like projection used to hide the real exterior which is even smaller (various sources quote it as a cold plasmic shell within a force-field, rendering it nearly impossible to damage), Each TARDIS can maintain several of these dimensional strings, with most of them being small energy/data types. When the ship lands/materializes, the tiny sensor-probe is instructed to "build up" a disguisable housing for the dimensional gateway/door.
Note - flying the ship with the doors closed but disguise (police box) materialized was considered risky at best and had potentially catastrophic risks involved. Never mind a bird flying in and pooping on the console, having the doors accessible meant there was the risk they might be forced open, and if the shields failed or were overloaded, one can imagine the damage a meteor could do if it hit the console.
In the event of instability of the interior dimension, an emergency door to a safe location would be created. However it was energy-expensive to form and maintain (farther from console room means deeper into the ship, making it more costly) so it would close as soon as any lifesigns in that part of the TARDIS were through it (to not only save power but to protect them from a possible explosion), and the door could lead anywhere in space/time (though generally "close to" the ship). (5th Doctor, Peter Davidson era, episode Terminus).
The "police box" disguise of the Doctor's TARDIS is, as described, "a flaw in the chameleon circuit". Older generations of TARDIS were basically limited to a phone-booth sized object to small rocket-ships, but always were the same thing -- an object with a hidden door. New generations (final ep of 2015, not the 2015 Xmas special) show that the exterior can now be very complex (is, a 1970's diner) with the door to the interior hidden as any object (freezer door, bathroom door, access door of a pop-can machine, etc) though objects and people in this complex exterior are left behind when it leaves (though a few fabric writers theorize that if you did a bit of technical trickery you could hop a ride this way, though it's not recommended as the air might also be left behind and you could be exposed to radiation or other such hazards such as the cold of deep space: though a local jump of a few minutes to the next county down the road might be survivable).
Smaller outside as better? This way the actual ship is quite tiny (think of gas mileage comparisons between a motorcycle, car, humvee, and a 747 are like. Travel in time is expensive, and getting from one galaxy to another in a few hours, no matter the method used, is expensive, so the smaller the ship can be made, the less power/fuel needed).