Q:

how does font work in windows OS /browser?

I know there are .ttf files.
I'm guessing this is the file that OS uses to display fonts? 
Does the browser uses the same font files to display fonts? 
If not, where does it stores it's own font files? 
what's the difference between the .ttf font and Unicode font? 
I mean how/where does Unicode fit into .ttf file format?

A:

Starting with the last question first, asking about the difference between TTF and Unicode Fonts is a bit like asking about the difference between "JPG files" and "Images". One is kind of a version of the other:
A modern .ttf file is not so much a "truetype font" as it is an OpenType font that uses the TrueType format for the part that needs to encode shapes and specify where inside the fonts those shapes can be found. Perhaps surprisingly, that's only a small part of what makes a modern font, and the important part here is that it's an OpenType font, not really that it uses the TrueType format.
The vast majority of modern fonts are OpenType fonts, with two common formats: .ttf for OpenType fonts that use TrueType format, and .otf for OpenType fonts that use the CFF format. There are a few more formats that OpenType can use (bitmaps and SVG, for instance), but you won't run into those a lot.
OpenType fonts also specify which character mappings they support, and they can support multiple mappings: it's entirely possible for a font to support a Unicode mapping as well as Windows-specific and Mac-specific non-unicode mappings, for several different languages, or not support Unicode's mapping, but be able to typeset text in tens of scripts that are also found in Unicode, just using different, unicode-incompatible mappings.
So, on to the first question:
Browsers get their default fonts from the OS. There is a set of "safe fonts" that all Operating Systems come with, and Browsers rely on that set for the default text rendering. Browsers, much like any big application, are compiled separately for each target platform, so they simply know which fonts are available on those platforms, and how to ask the OS for them.
In addition to this, CSS can be used to specify that there is content that needs to be styled by a non-default system font, or even by a font that is explicitly pointed to by a URL (using @font-face rule). For system fonts, the browser will simply ask the OS for the font reference, for fonts-by-URL the browser downloads the font, and then uses that. But, in both cases, only provided that the font passes a few security checks to make sure it's not (sometimes subtly) corrupt or internally inconsistent.

