As the highest and often most piercing member of the brass section, the trumpet is not a quiet instrument. This creates a major challenge for any trumpeter trying to get in some quality practice time at home: How to play without annoying the neighbors. The best approach is to utilize a variety of practical solutions that allow you to keep your neighbors happy without sacrificing any portion of your practice routine.
Talk to your neighbors about your practice schedule. Explain to them that you need to practice regularly, both for the sake of improving your skills and for keeping your mouth muscles in shape to continue playing your instrument well. Ask them about their schedule and when would be the best times for you to play and not disturb them. This conversation will go the best if you talk about it before the trumpet playing is an issue. If complaints have already come out, open with an apology about the noise.
Purchase a practice mute. This is a device that you insert into your trumpet bell, which renders its tone quiet enough to not be heard in the next room; the player listens using headphones. It's problematic to practice with this mute all the time, since it restricts your ability to correctly assess your volume and tone, but it can buy you a lot of valuable practice hours.
Set up an alternative practice space to use once or twice a week without worrying about bothering anyone. Good alternatives include spaces within local universities or church venues, if they will allow it.
Practice in a room with lots of soft goods and carpeting; this absorbs a good deal of your volume, especially if the room is small and the soft goods are in thick layers. Cover up hard, reflective surfaces like tabletops and windows with blankets in order to increase this effect.
Avoid making unpleasant sounds at times when you know your neighbors are likely to hear you. Avoid music and exercises like high and low range extenders, repetitive exercises (or repeating a difficult passage), or loud ensemble parts. Save these for times when neighbors aren't around, or for practice mute time.
Watch the volume. Save the big orchestral excerpts and fortissimo playing for the times when you know you can let loose, or talk to your neighbors and get “permission” to work on these when you really need to.
Show your neighbors little gestures of gratitude every now and then, such as "thank you" notes or cookies, especially at times when they've had to listen to you practicing more than usual (say, if you've been prepping for an audition or big performance).