Your main issue is that you need \left\{ and \right\} (note the \ before the curly brackets). However just \{ and \} alone (no \left and \right) would be preferable here. See these questions for more:
If you fix this problem, your code will compile (assuming you have already defined \R as \mathbb{R} - it is not defined by default). However, there are other problems with your code, try this:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[usenames]{color}
\newcommand{\green}[1]{\textcolor{green}{#1}}
\begin{document}
\noindent% just for the example
$N$ examples, each $\text{(input $\mathbf{x}_{n}$, label $y_{n}$)} \in
\mathcal{X} \times \{1, 2, \dots, K\}$
\[
\boxed{\text{and cost matrix $\mathcal{C} \in \mathbb{R}^{K \times K}$}}
\]
---will assume
$\mathcal{C}(y, y) = \green{0} = \min_{1 \leq k \leq K} \mathcal{C}(y,
k)$
\end{document}

Your main problem is using x for \times.
For more information on why you were getting an error, allow me to plug my own answer over here: https://tex.stackexchange.com/a/253082/16968. Because \left and \right require a printable delimiter after them, you need to use \{ and \} (which produce the { and } delimiters) not { and } which are used to delimit arguments to LaTeX commands not to print delimiters in the actual output.
\left\{and\right\}(note the backslash before the curly brackets). However just\{and\}alone (no\leftand\right) would be preferable here. – Au101 Aug 31 '16 at 22:49