The jib of a sailing vessel is the most forward sail and it has a very important function especially if the ship is on a course that is "close to the wind ".
Close to the wind means trying to point the nose of the ship as "close" to where wind is coming from. On the Nose so to speak.
On a sloop, currently the most popular design of sail plan, one mast has the jib, from the bow to the stern in sizes that depend on what type of sailing you are "rigged " for. The larger the faster until it can render the ship unstable.
The combination of jib and mainsail,efficiently reefed,acts somewhat similarly to the wing of an aircraft in that they create lift, allowing the ship to head closer to the wind while maintaining a high hull speed.
Without a jib tight, the ship won't point as high.
From any greater angle to the wind both sails are "Trimmed' to maximize the desired characteristics of the trip.
The spinnaker is used for down wind sailing i.e. the wind is almost directly behind you and it acts almost like a wall.
The wind hits the wall and pushes the ship downwind.
If you want more technicals let me know.