Alisa, they aren't stupid questions. Better that you ask and find out than just stay silent and do something wrong.
A washing machine needs a P-trap (the curved trap-- named so because it is shaped like a P lying face down). It's purpose is to hold a small amount of water that prevents sewer gases from coming back up in to the home and making people sick (or even causing death).
It also needs a vent (a pipe that carries the air out through the roof and allows air to come in to keep the pressure inside balanced) to prevent a vacuum from forming.
Any horizontal pipes going to a waste line need to slope downward at about 1/4 inch per foot to carry water and waste. Any horizontal pipes for venting need to slope upward at 1/4 inch per foot as well. Vent pipes cannot run horizontally (I believe less than 45 degree angles are considered horizontal) until they are at least 6 inches above the flood level of the highest fixture attached to the vent. The vents must attach to the pipes at or before the pipe goes down to the main drain pipe. If it forms a horizontal S then it is called an S trap and it is not-to-code. An S trap will allow waste to be siphoned out (and allows water to be siphoned out of the trap).
For a washing machine there are specific parameters that need to be met. The washing machine drain hose sits in something called a
standpipe. It is an open pipe that goes down about 18 to 30 inches to the
trap weir (which must be above the finished floor). The hose cannot go too far in to the pipe, but must be held on securely enough to not just fall out. The trap weir should be between 6 to 18 inches above the finished floor (you probably wouldn't want to have it be too close to the floor since you may need to remove the trap to clean it.
TL: DR?
I hope this diagram is helpful:
The drain attaches to the waste stack with a
sanitary tee (I can't remember if it has to be 2 inches inside diameter). Sanitary tees must be used in the vertical position as pictured. The waste stack basically carries waste to the sewer but also goes all the way up through the roof for venting.
I am curious though: If a sink was nearby, I know that it would need its own vent, but which fixture would tie in higher? sink or washing machine? I'm thinking sink would tie in higher because the washing machine has more water to drain.
Am I right?