Are you really sure you want to know? - It is long.
But then how can something like this be explained easily.~ That is why it has never been done before and you are now joining the elite and very few number of people who have this knowledge.
If you think you can handle it, then here it is:
Fundamentally the Tardis is a 'probability' calculator that allows travel in time and space. As we know from Einstein, Time is relative ie. there is no such thing as 'absolute time'
We also know from 'Stephen Hawkins' that time does not travel in one linear direction.
Everything that happens happens in time. But everything that happens is based on probabilities. For example you bump into a friend at a concert in a crowd of say 10,000 people(It's a festival) O.k you say; That is just 1 in 10,000 a big number but not that amazing. But it is in fact a much bigger number than that. Yes, it is 1 in 10,000 'People' but the number of events that led up to it happening is enormous. For example if you hadn't spilt that beer, you wouldn't have gone to your tent to change your shirt, so you would have been in a different place etc. etc. etc.
If you try to calculate all the possible chain of events that lead to an event it is totally impossible because that niumber is infinite. You can call each event a 'Probability Event' which causes other 'Probabiliity Events' in all directions.
In order for all possible chain of events to happen all probabilities have to exist at the same time. Seeing as time is different for each observer (in this case the observer is the event that is the result of all probabilities) Then all time also exists at the same time and can go in any direction.
Think of it like a huge sphere with a network of points (probability events) all joined together in a big mesh. Time is supended in a sphere of probabilites and can travel in any direction.
The centre of the sphere is what is called the 'Time Vortex' which is the point at which all events and time are connected together. From there you can get to any event at any time. Everyone knows that the Tardis travels through the 'Time Vortex' that is shown at the opening and closing part with the music and the Tardis is spinning around.
In the middle of the central contol panel is the the glass cylinder that moves up and down when they start traveling. It is a huge probablility calculator and when it reaches close to the point where it has calculated all the probabilies ( I say 'close to' because probabilites are infinite and the cylinder is always several probabilites behind) the Tardis is sucked into the 'Time Vortex'
When the cylinder stops moving up and down they will be at the point that it has calculated to. They will then step out into whatever time - place and events that are happening there.
The Doctor can then prevent bad things happening to civilisations or people or create new realities by his actions. Of course that is dangerous work because all kind of creatures that are the result of the kind evolution that happened depending on all the probabilites throughout all the probable histories are there to be met and faced if they are not friendly, which a lot of them aren't.
Also once times, places and events have been visited they are stored in the Tardis's memory, which is why they can travel back and forth to places they know and face enemies that they know, and therefore keep battling their evil intentions. Of course the greatest of these is 'The Daleks'
So you see it is not really as complex as it might seem. Of course the big question is how the glass cylinder does all the calculations.
I haven't worked that out yet, but I am working on it. As soon as I know, be assured that you will be one of the first people to be informed.
Only pass this information on to people you trust. If everyone knew it, they would all try to build their own Tardis's and put too much strain on the 'Time Vortex' A bit like 'Global Warming' and the consequences would be cataclysmic!