Cartwright is a London kid whom Holmes hires to do a bunch of odd jobs for him. Like an intern, except he gets paid. Watson describes him as a "lad of fourteen, with a bright, keen face" (4.116). Apparently, he also has "great reverence for the famous detective" (4.116): in other words, Cartwright hero-worships Holmes.
"Cartwright" is basically a useful plot device to explain how Holmes gets things done when, even as a great detective, he can't be in two places at once. We figure he must be a reliable errand-boy, because, really, would Holmes hire anyone who wasn't?