Connecting up washing machine
The two things you are looking at are valves with missing handles, one for hot water and one for cold water (clothes washers generally use both: cold for "darks", warm for "colors", and hot for "whites").

The larger black pipe visible on the far left side of your picture looks like a drain line suitable for the dirty-water discharge from your machine.

The hot and cold valves need to be replaced. The one on the right (usually cold) probably has that cap on it because it leaks by, and neither can be operated properly in their current state. Replacement will necessitate turning off the supply upstream, finding that upstream location would be your first objective here. Also you need to assess that drain line as it looks like it is being utilized for something else right now (note the corrugated tubing inserted into it).