From the get-go, it's Sancho's job to do whatever Don Quixote tells him.
As you can imagine, this leads Sancho into trouble from time to time. Sancho doesn't like getting into trouble, but he's very loyal to his master, claiming that "a child may persuade [Don Quixote] it is night at noonday, and he is so simple, that I cannot help loving him with all my heart and soul, and cannot leave him in spite of all his follies" (184.108.40.206). Sancho can see the faults in his master, and he knows that the dude's... eccentric. But for all that, he feels a loyalty toward him, and that's an admirable thing.
That said, Sancho isn't one to fly into battle at the first sign that his master is in trouble. On several occasions, Don Quixote calls upon Sancho to stand up and fight, but Sancho always answers, "I am a peaceful man, a harmless quiet fellow" (220.127.116.11). Well, that's one way to put it. Basically, Señor Panza is just plain scared.
Sancho is plenty loyal when it comes to riding around with Don Quixote, but when it comes to the threat of physical violence, he has no interest in Don Quixote's adventures. This point becomes especially obvious later in the novel, when Sancho downright refuses to take a whipping on his bum in order to lift a curse on Don Quixote's beloved Dulcinea—and that's despite pretty much believing that it's necessary. He doesn't know it's just a joke.
For all we've said about Sancho Panza's loyalty to Don Quixote, we don't want you to start thinking that this guy is some kind of simple-minded saint. Sancho follows Don Quixote around for one reason: to get something out of it. He knows Don Quixote is weird and eccentric, but he also knows that this is one loaded geezer. Moolah. That's what Sancho P. is after.
For starters, the only reason Sancho goes with Don Quixote in the first place is because the Don has promised him "that it was likely such an adventure […] might secure him the conquest of some island […] and then the squire might promise himself to be made governor of the place" (18.104.22.168). And let's not forget that Sancho Panza totally leaves his wife and kids for months at a time to follow Don Quixote on the road. Sorry to say, but the dude can be pretty selfish.
On top of his opportunism, Sancho has no trouble bending the truth to suit his ends. For example, he outright lies about finding Cardenio's wallet in Part 1 of the book, saying, "I saw the portmanteau too, do you see, but the Devil a bit would I come within a stone's throw of it" (22.214.171.124).
Old Sancho just wants to keep the gold inside for himself—and that's exactly what he does. He totally spends all the gold before anyone can think to ask what happened to the wallet. Add to this dishonesty all the money that Sancho swindles out of Don Quixote by fake whipping himself, and you've got yourself some selfishness to go along with Sancho's loyalty.
Let's be real: Sancho comes across as kind of vacant for a lot of this book. A big part of that you can pin on the narrator himself, whose first comment about Sancho is "for he was poor indeed, poor in purse, and poor in brains" (126.96.36.199). But as the novel continues, especially in Part 2, we discover that this isn't necessarily the case.
When Sancho becomes the governor of the fake island of Barataria, all of the servants on that island expect him to be a bumbling idiot. And he is, in some ways. But he is also extremely good at making judgments on everyday, practical things like money and livestock. On his first day in office, he makes a few decisions at which "[a]ll the spectators were amazed, and began to look on their governor as a second Solomon" (188.8.131.52). The allusion to King Solomon from the Bible here is Cervantes's way of saying that Sancho is very wise, since King Solomon was known for his wisdom and good judgment.
So when you combine all these things we know about Sancho, you see that he's a contradictory and complicated dude. On the one hand, he's uneducated and bad with words. But on the other hand, he's very wise in his own down-to-earth way. He certainly finds some ingenious ways to get out of the messes Don Quixote gets him into. He can also be totally loyal in some instances and totally self-centered in others. When you get down to it, Sancho is contradictory and flawed, which basically makes him realistic, because nearly everyone you'll ever meet in real life is contradictory and flawed.
What does it mean, by the way, that Sancho is one of the few people who actually believe in (some of) Big Q's ravings? In some ways, Sancho is kind of a fool, just like his master, Don Quixote. Like other famous fools of the time (take a look at Lear's Fool in King Lear and Feste in Twelfth Night, for example), Sancho and Don Quixote seem simple-minded, strange, and, well, just downright foolish... but this foolishness often disguises some real wisdom.
We've already seen how there's some wisdom in Don Quixote's madness (see his "Character Analysis" for more). Sancho, sort of like Shakespeare's Sir John Falstaff, shows that even a silly, dishonorable, frequently tanked old coot can be a memorable character with some true wisdom as long as he's got a good imagination and, when it comes down to it, a pretty good heart.
If there's one thing that Don Quixote has to say, it's that appearances can be deceiving. Cervantes isn't just tearing down the silly conventions of medieval knight-errantry; he's also showing how complex even a couple of silly old fools like Don Quixote and Sancho Panza can be.
(Note: Sancho's name appears in some editions as "Sancho Panca" or "Sancho Pança.")