Short answer: For the text in the question, you can use:
{\dn m\?r\? mAtA aOr EptA ko smEp\0t.}
Longer answer follows.
Recommended way (XeTeX and Unicode font)
In general, to type Devanagari in (La)TeX, it is best to use a Unicode-aware engine like XeTeX [or LuaTeX, but LuaTeX's support for Indic (and most non-Latin) scripts is rather poor]. For example, you can just compile the following with xelatex:
\documentclass{article}
\usepackage{fontspec}
\newfontfamily\hindifont{Noto Sans Devanagari}[Script=Devanagari] % Use any Devanagari font on your system
\begin{document}
This is Latin script and {\hindifont यह है देवनागरी}.
\end{document}

or for better results if you have a lot of Hindi text, it is recommended to use the polyglossia package too (for things like hyphenation and other language-specific rules):
\documentclass{article}
\usepackage{polyglossia} % Automatically loads fontspec
\setmainlanguage{english}
\setotherlanguages{hindi}
\newfontfamily\hindifont{Noto Sans Devanagari}[Script=Devanagari] % Use any Devanagari font on your system
\begin{document}
This is Latin script and \texthindi{यह है देवनागरी}.
\end{document}
Deprecated but still working way (non-Unicode font)
If for some reason you cannot use XeTeX, then you can use the old devanagari package. This requires two passes. First, you type everything into a .dn (not .tex) file, with the Devanagari parts inside {\dn ...}, using Velthuis encoding for the Devanagari text. (Invoke texdoc velthuis to read the manual for details.) Then you run devnag on this .dn file, to create a .tex file. Then you compile this .tex file.
For example, for the text in the question, you can create a .dn file with:
\documentclass{article}
\usepackage{devanagari}
\begin{document}
This is English. {\dn mere maataa aura pitaa ko samarpita|} English again.
\end{document}
Then running devnag file on this .dn file produces the following .tex file:
\def\DevnagVersion{2.17}\documentclass{article}
\usepackage{devanagari}
\begin{document}
This is English. {\dn m\?r\? mAtA aOr EptA ko smEp\0t.} English again.
\end{document}
Now you can compile this file with say pdflatex, to get:

Tools
- To go from the Devanagari to the required Velthuis transliteration (e.g. from
मेरे माता और पिता को समर्पित to {\dn mere maataa aura pitaa ko samarpita}, you can use this tool I wrote a long time ago (or just learn the conventions from the documentation and type it manually).
- To go from the
.dn file to the .tex file, you need the devnag processor installed, which comes with TeX Live. If you're using a different distribution, it may be under a different name, or you may have to compile it yourself.
- To go directly from Devanagari to the
\dn convention and skip the previous two steps (e.g. from मेरे माता और पिता को समर्पित to {\dn m\?r\? mAtA aOr EptA ko smEp\0t.}, you may be able to use the Python script I wrote for another answer a few months ago.
babelor xelatex withfontspec(with Devanagri-capable font) andpolyglossia? In both cases you would probably be able to write directly in Devanagri in unicode using\usepackage[utf8x]{inputenc}. – Oleg Lobachev Jan 01 '18 at 04:10