Trumpet: Fixed tubing length. Pitch changed by valves (3 pistons) + lip tension/air speed. No slide.
Trombone: Uses a telescoping slide (U-shaped) to lengthen/shorten tubing continuously. 7 slide positions approximate chromatic scale.
Slide trumpet (historical): Renaissance/Baroque instrument with a single slide — precursor to trombone. Rare today.
Valve trombone: Has valves instead of slide — used in 19th-c. bands, some jazz.
So if you see a brass player moving a long U-tube in/out — it's a trombone. Trumpet players press buttons.