Timing

It's always good to play along to something.
This can be anything from a metronome, drum-machine or mp3/audio loop, or even better - another musician!

 

A good way to nail timing is to always tap your foot along, even just a toe-wag, if you internalise the beat into you body then your sense of rhythm will become better.
Many musicians with impeccable timing do so by unconsciously subvocalizing rhythms.
This can be a valuable tool for rehearsing and maintaining complex rhythmic patterns.
Eventually you can develop your own internal metronome/beatbox that can instantly "beat-match" to any tempo & hold a steady rhythm, it just takes practise!

Jordi Pich has researched the subject and performed some interesting experiments which you can read about here:
The Role of Subvocalization in Rehearsal and Mantenance of Rhythmic Patterns.

Invaluable control of internalized music can be achieved by using a reversal of the "ear-worm" phenomena.
Many people get plagued by the intrusive internal repetition of an annoying pop tune or jingle that's been encountered on radio or television. ( I know I do! )
This is known as an "ear-worm".
I have found that the only antidote to this ( aside from actually listening to an alternative external music source ) is to counter with a fully formed recollection of some music that I'd prefer.
The neural mechanism behind this can be used for good also!
This applies for not just rhythmic pattern recollection, but for the memorisation of melodic progressions and entire compositions..

Some say that the root of musical creativity lies in developing the act of "deep listening"... indeed this is necessary in order to train the brain to percieve detail and complexity - the difference between actively listening and passively hearing.

Much can be gained by taking control of the brains "internal mp3 player" not just to recreate music on demand but also as a compositional tool.
During improvisation this same mechanism is used for previsualization purposes, in order to predict the effect of musical decisions as a passage progresses.