Squire Trelawney is a local example of the landed gentry, or nobility, in Jim's hometown. His status isn't as high as that of a lord, baron, or earl, but he does have aristocratic blood. He is a good-hearted guy, extremely patriotic and generous, but these traits also leave him vulnerable to worldly wise characters like Long John Silver. As soon as Silver claims that he lost his leg in a war under Admiral Edward Hawke, Squire Trelawney is so impressed by Silver's English heroism that he takes absolutely everything Silver says at face value – and almost winds up murdered by pirates as a result.
Squire Trelawney's main importance to the plot is to be the fool who gets his friends into this mess in the first place. He's the one who puts up the money for the voyage, and he's the one who (accidentally) hires a crew of pirates. Once Squire Trelawney is proved wrong and Captain Smollett takes over, Trelawney fades into the background. He becomes just another person on the good guys' side. When Doctor Livesey goes to ambush the pirates in their treasure hunt, Squire Trelawney is left behind to guard the injured Captain Smollett. He doesn't even get any actual lines when Jim comes back to his friends after going AWOL from his fort. The squire is basically an amusing plot device to get them all on a ship with some pirates, and once that goal is achieved, he pretty much disappears from the book.
The one exception to Squire Trelawney's relative silence in the last two-thirds of the book is when Tom Redruth dies on the island. Squire Trelawney kneels over his faithful servant "crying like a child" (18.12) and begs Tom to forgive him (presumably for bringing the man into harm's way like this). Tom tells him that it would be inappropriate for him to presume to forgive his master, and then he quietly passes away. This exchange demonstrates the squire's strength of feeling and the intense loyalty that ties his servants to him, but it doesn't tell us anything particularly new about the squire's character. Once he's done his job in the book by getting all the characters together on a boat, his mission is accomplished and he more or less disappears.