What should have capital cases in the title of works in the bibliography?
It depends on the citation style. Basically there are two possibilities: title case, or normal English sentence style.

If you are writing for a journal, it surely has a citation style that you should adhere to. In practice, however, the style of citations won't really matter until the time your paper is accepted, so you do not need to worry about it when writing.
If you are writing for yourself, you are free to decide as you prefer, as long as you are consistent. If you are writing a thesis, be sure to inquire  because some OCD university committee might have imposed requirements.

Bibtex is essentially a program to abstract out citation styles and apply them programmatically, separating content (in the .bib file) from formatting. Using a properly formatted .bib file, you just need the command \bibliographystyle{} to change from a style to the other.

So, how should the title field be formatted in a properly-written .bib file? Like this:

title = {Handwriting Recognition with Hidden {M}arkov models and Grammatical Constraints}

Basically you use title case and embed into a pair of braces the characters that should stay in capital even if the text is converted to sentence case. Bibtex can convert automatically title case to sentence case (but not vice versa). Commands for diacritics and special characters (such as \"a or \c{c}) and dollar-delimited formulas should also go inside an extra pair of braces.

Incidentally, another tricky aspect of Bibtex syntax is author name formatting. Authors should be in the format

author = {von Lastname1, Firstname1 Middle and Lastname2 jr., Firstname2}

or, if full given names are not available,

author = {von Lastname1, F. M. and Lastname2 jr., F.}

Note that 90% of the bibtex files that you will find on the internet, even the ones from the publishers' websites, are badly formatted. Bibtex's syntax is quirky and complicated to get right.