Transform is a component for defining a GameObject’s relative position, rotation, and scale. The parent, and zero or more child objects are also described here. Most objects added to a scene get this assigned automatically.
RectTransform is a Transform, but with extra info for managing an object as a UI element. So, some aspects might be constrained (greyed out) by parent objects. This includes information for managing a relative pivot and anchor, for example. You can also use the T mode in the Unity scene view to adjust things with a RectTransform, which can make it nice to edit UI edges and anchors.
Objects added to the scene through the Unity menu creating a UI object will have RectTransform automatically, as will any empty objects added as children to that object.
RectTransform is inherited from Transform and is normally used with GUI, but You can use it for other things. It has all of the inherited properties of Transform, but it also contains anchoring properties which are great for the GUI.