  We introduce a new class of Hardy spaces $H^{\varphi(\cdot,\cdot)}(\mathbb
R^n)$, called Hardy spaces of Musielak-Orlicz type, which generalize the
Hardy-Orlicz spaces of Janson and the weighted Hardy spaces of Garc\'ia-Cuerva,
Str\"omberg, and Torchinsky. Here, $\varphi: \mathbb R^n\times [0,\infty)\to
[0,\infty)$ is a function such that $\varphi(x,\cdot)$ is an Orlicz function
and $\varphi(\cdot,t)$ is a Muckenhoupt $A_\infty$ weight. A function $f$
belongs to $H^{\varphi(\cdot,\cdot)}(\mathbb R^n)$ if and only if its maximal
function $f^*$ is so that $x\mapsto \varphi(x,|f^*(x)|)$ is integrable. Such a
space arises naturally for instance in the description of the product of
functions in $H^1(\mathbb R^n)$ and $BMO(\mathbb R^n)$ respectively (see
\cite{BGK}). We characterize these spaces via the grand maximal function and
establish their atomic decomposition. We characterize also their dual spaces.
The class of pointwise multipliers for $BMO(\mathbb R^n)$ characterized by
Nakai and Yabuta can be seen as the dual of $L^1(\mathbb R^n)+ H^{\rm
log}(\mathbb R^n)$ where $ H^{\rm log}(\mathbb R^n)$ is the Hardy space of
Musielak-Orlicz type related to the Musielak-Orlicz function
$\theta(x,t)=\displaystyle\frac{t}{\log(e+|x|)+ \log(e+t)}$. Furthermore, under
additional assumption on $\varphi(\cdot,\cdot)$ we prove that if $T$ is a
sublinear operator and maps all atoms into uniformly bounded elements of a
quasi-Banach space $\mathcal B$, then $T$ uniquely extends to a bounded
sublinear operator from $H^{\varphi(\cdot,\cdot)}(\mathbb R^n)$ to $\mathcal
B$. These results are new even for the classical Hardy-Orlicz spaces on
$\mathbb R^n$.
