A boat is said to go downstream if it is moving along the direction of the stream. The net speed of the boat in this case is called downstream speed. A boat is said to go upstream if it is moving in the direction opposite to the direction of the stream. The net speed of the boat in this case is called upstream speed.
Still Water: If the speed of the water in the river is zero, it is still water.
Stream: If the water of the river is moving, it is called a stream.
Upstream: If a boat (or a swimmer) moves against the stream, in the direction opposite to that of the stream, it is called upstream.
Downstream: If a boat (or a swimmer) moves with the stream, along the direction of the stream, it is called downstream.
When the speed of a boat or a swimmer is given, it usually means speed in the still water.
If the speed of a boat (or a swimmer) be x km/h and the speed of the stream or the current be y km/h, then

Speed of the boat downstream = (x + y) km/h

Speed of the boat upstream = (x  y) km/h
Examples
Example 1: The speed of a boat in still water is 20 km/h. If the speed of the stream be 4 Km/h, find its downstream and upstream speeds?
Speed of the boat (x) = 20 km/h
Speed of the stream (y) = 4 km/h
Downstream speed = x + y = (20 + 4) = 24 km/h
Upstream speed = x  y = (20  4) = 16 km/h
Example 2: A boat is rowed down a river 40 km in 5 hr and up a river 21 km in 7 hr. Find the speed of the boat and the river?
Speed of the boat downstream = 40/5 = 8 km/h
Speed of the boat upstream = 21/7 = 3 km/h
Let the speed of boat be b and river be r.
b + r = 8
b  r = 3
Adding,
b = 11/2 = 5.5 km/h
Subtracting,
r = 2.5 km/h
Example 3: A man can row 7 km/h in still water. If the river is running at 3 km/h, it takes 6 hrs more in upstream than to go downstream for the same distance. How far is the place?
Speed downstream = 7 + 3 = 10 km/h
Speed upstream = 7  3 = 4 km/h
According to the question,
10t = 4(t + 6)
t = 4 hours
Distance = 10t = 40 km
Example 4: A man can row at the rate of 4 km/h in still water. If the time taken to row a certain distance upstream is 3 times as much as to row the same distance downstream, find the speed of the current?
Let the speed of current be s km/h
d/(4  s) = 3 × d/(4 + s)
4 + s = 12  3s
s = 2 km/h