How about this. I added some explanations in the code. You may ask for details if a line is unclear :-)

Code
\documentclass{article}
% load TikZ and the required library package
\usepackage{tikz}
\usetikzlibrary{positioning}
% load lmodern to get free scalable fonts
\usepackage{lmodern}
% define the label, it's font and mesure it's length
\newcommand{\practicename}{practice}
\newcommand{\practicelabelfont}{\footnotesize\scshape}
\newlength{\practicelabellength}
\settowidth{\practicelabellength}{\practicelabelfont\practicename}
% define the number font size according to the label
\newlength{\practicenumsize}
\setlength{\practicenumsize}{\practicelabellength}
\addtolength{\practicenumsize}{-10pt}
\newcommand{\practicenumfont}{%
\fontsize{\practicenumsize}{\practicenumsize}\selectfont
\sffamily\bfseries
}
% define TikZ styles for the number and the label
\tikzset{
practice num/.style={
name=PRACTICE NUM NODE,
minimum size=\practicelabellength,
font=\practicenumfont,
fill=black,
text=white,
outer sep=0pt,
inner sep=0pt,
rounded corners=2pt,
},
practice label/.style={
font=\practicelabelfont,
inner sep=0pt,
outer sep=0pt,
above=2pt of PRACTICE NUM NODE,% change the distance between
% the box and the lable here
},
}
% define a command that prints one argument in the box
\newcommand{\practice}[1]{
\begin{tikzpicture}
\node [practice num] {#1};
\node [practice label] {\practicename};
\end{tikzpicture}
}
\begin{document}
\noindent
It'll only work with numbers from 0 to 99:\\[\baselineskip]
\practice{9}\quad\practice{99}\quad\practice{999}
\end{document}
To increase the possible range to 999 you may increase the label font size or decrease the number font size.
Some explanations
Label, fonts and lengthen
The first thing we do is to setup some TeX macros, that make changes easy. Of course we could include all thin in the TikZ picture but I prefer to dived things in smaller pieces and approve a few more lines of code. So define the Label as a macro named \practicename,
\newcommand{\practicename}{practice}
set a font for it \practicelabelfont
\newcommand{\practicelabelfont}{\footnotesize\scshape}
and measure it’s width \practicelablewidth.
\newlength{\practicelabellength}
\settowidth{\practicelabellength}{\practicelabelfont\practicename}
The next step is to set up the number font \practicenumfont. To make the fontsize depending to on the label width we set a new length \practicenumsize to the width of the label and decrease it by 10 pt:
\newlength{\practicenumsize}
\setlength{\practicenumsize}{\practicelabellength}
\addtolength{\practicenumsize}{-10pt}
With this length we are able to set the fontsize using \fontsize{<size>}{<baselineskip>}. Since this is a basic font command it’s necessary to activate it with \selectfont.
\newcommand{\practicenumfont}{%
\fontsize{\practicenumsize}{\practicenumsize}\selectfont
\sffamily\bfseries
}
Styles
Now we define two TikZ styles. One for the label and another for the number. We use \tikzset, which can do all settings for TikZ. To create a new style one must use the syntax <name>/.style={<options>}. We define the style to set the fonts and node size/shapes/filling. Furthermore we define a name for the number node
name=PRACTICE NUM NODE,
This is basically the same as if we say
\node (PRACTICE NUM NODE) [<options>] {<num>};
later in the code. But we can ensure that this name is unique and always refers to the right, i.e. the last specified, node. We know that the number node will always have the name PRACTICE NUM NODE so we can set the position of the label as part of it’s style
above=2pt of PRACTICE NUM NODE,
Now the label will be centered exactly 2 pt above the number node. Not that we set all outer and inner sep to 0pt.
Wrapper
The last step is to define a new macro setting up the two nodes. The macro should take on argument holding the practice number. All it has to do is to build a {tikzpicture} with two nodes in the right style and with the right contents, i.e. #1 for the number node and the predefined \practicename for the label node.
\newcommand{\practice}[1]{
\begin{tikzpicture}
\node [practice num] {#1};
\node [practice label] {\practicename};
\end{tikzpicture}
}
Usage
Prepared with that we can print the practice number with \practice{}. Assuming we set up a counter practice holding the right number we’d call
\practice{\thepractice}