I’m sorry to hear about your problem, although I’m delighted to hear that you enjoy school so much. This is a much more common problem than you think and lots of children keep quiet in school for fear of being thought of as the class ‘swot’ or the ‘brainbox’.
You shouldn’t have to keep quiet to keep your friends though, and anyone who tells you this isn’t a real friend. Sometimes, people can feel a bit threatened by someone if they think that person is brighter or more hardworking than they are, and the way they deal with it is by putting the blame on someone else – in this case you – by telling you to keep quiet.
Don’t let this person stop you from enjoying school (or doing your homework!) – there’s nothing wrong with loving your lessons and wanting to know more. That’s why so many students go on to further education even after they’ve finished school. You’re just getting a head start by studying hard now! In years to come, when you’re getting good results in exams, you’ll be glad that you made the choice to pay attention in class.
If you feel that the problem is getting worse, then it’s worth having a word with your teacher to let them know what’s going on. Chances are, he or she will have already noticed and will be happy to have a chat with you (and your ‘friend’) about it.