There are a number of terms for these things:
When two objects have either the same right ascension or the same ecliptic longitude (usually as observed from Earth). That is, they lie in (almost) a straight line from the point of view of the observer. In the case of the Solar System, such as when the Sun and Venus line up from the point of view of an observer on Earth, this is a conjunction. (It is also a conjunction when Earth lines up between e.g. Mars and the Sun - it is an inferior conjunction from the point of view of Mars (but we can't observe from Mars)).
Furthermore, when Venus lines up between the Earth and the Sun this is an inferior conjunction, and when Venus lines up with the Sun but on the opposite side of the Sun then this is a superior conjunction. Thus the inner planets (Mercury, Venus) can have both inferior conjunctions and superior conjunctions with Earth while the outer planets (Mars, Jupiter, etc.) can only have superior conjunctions with Earth.
The "almost" in "almost a straight line" is important because the definition is by longitude. Although the planets are said to lie in the ecliptic plane, this is not completely flat - they do not all have the exact same orbit inclinations. Thus not every conjunction is a transit, occultation or eclipse - they do not pass directly in front or behind.
When an object passes in front of a larger object*, this is a transit. These are rarer than conjunctions because the objects need to be directly in line so that one can be seen crossing the other.
In the case of recent transit of Venus, when Venus passed in front of the Sun, the sunlight passing through Venus' atmosphere gave us the opportunity to collect data on its composition. When one of the moons of Jupiter pass in front of Jupiter itself* this is also a transit.
When an object passes in front of a smaller object*, this is an occultation. The farther object is hidden by the nearer object. These are also rare** because, like transits, they also need to be directly in line so that the nearer object can be seen crossing in front of, and blocking out, the farther object.
Asteroids occulting stars are studied because while we can calculate the asteroid's orbit and its distance from us using its speed, knowing how gravity and orbits work, etc., we can't see clearly enough to determine the size (think few kilometres in diameter but millions of kilometres away). But when an asteroid passes in front of (occults) a distant star, the star is effectively a point source (looks tiny), from the amount of time the occultation lasts and the asteroid's speed we can calculate its size***.
The Moon passing in front of the Sun is, depending on the conditions, a partial eclipse, total eclipse or annular eclipse.
Clearly, by the definition, when the Moon fully blocks the Sun it is an occultation and when it only partially blocks the Sun it is a transit, but
this is a special case and is called a solar eclipse rather than a transit or occultation. (Similarly when the Moon passes through the Earth's shadow - when the Earth is directly between the Sun and the Moon - it is called a lunar eclipse.)
The word eclipse comes to us via Latin and French from ancient Greek ekleipsis, from ekleipein 'fail to appear, be eclipsed', from ek 'out' + leipein 'to leave'. (see eclipse on Wikipedia)
This alignment is also known as a syzygy****.
* Smaller or larger as they appear to the observer, an asteroid is most definitely smaller than a star but because it is so much nearer it looks bigger.
** A lookup of occultations can return a long list so that it may not seem rare, but when you compare how many asteroids there are, and how many stars, in relative terms it actually does not happen very often.
*** We can set limits on its size, given that the "average" asteroid looks like a lumpy potato rather than being some nice, regular shape that would make it easy to work these things out.
**** We could keep adding terms and googling them all day... ;-)
***** There is no footnote with five *