This is a pretty easy thing to do once you have learned how to do it. The order is important, and it should go something like this: mouthpiece, slides, the pistons, and the valve caps.
The mouthpiece will be the easiest thing to take off, since it should be taken off each time the instrument is stored.
To get the slides off, you literally just slide them out. Do be careful if they are stuck or “frozen” as being too harsh with your trumpet could damage it. Best bet here is to take it to your local repair shop.
The valve caps should simply screw off. If they don’t come off easily, follow the advice given for stuck or frozen slides.
To get the pistons off, you unscrew the cap at the top and gently slide them out.