Flow control is an algorithm between two devices. To make sure the sender does not send more/faster than the receiver can receive. It can be as simple as the receiver sending control-S and control-Q to pause the sender.
Congestion control is an algorithm in a network with multiple devices. The goal is to make sure not one single sender can use all the bandwidth, and starve all the other senders in the network. The limitating factor with congestion is not the receiver, but the network that is in-between senders and receivers.
Flow-control and congestion-control are very related. But they are not the same.
Let's look at TCP.
When two devices communicate over TCP, the receiver can do flow-control by changing the value of the advertised receive-window. If the receiver sets the window to 0, it basically means that the sender needs to stop sending new data. Until the receiver send another TCP-segment with a larger receive-window (larger than 0).
Another mechanism for flow-control with TCP are the acknowledgments. When a sender starts sending TCP-segments, he will receive acks from the receiver. The sender can look at the pace/speed of the incoming acks to make an estimate how fast he can keep sending.
Congestion-control with TCP works differently. Routers in the middle of the network, that experience congestion, will start dropping packets. The sender will notice that, because he gets no more, or less acks back. When a sender sees that, he must start sending TCP-packets at a slower pace. So the dropping of packets is a mechanism to achieve congestion-control in TCP/IP-networks.
Flow control can happen on any layer. Congestion control is in layer 3 and 4.
Hope this helps.