How is the pushback tug connected to the airliner?
You're correct that there are two ways to connect the tug with an aircraft.


In case a tow bar is used, it is fixed laterally at the nose landing gear, while allowing slight movement for height adjustment. Usually, the tow bar may pivot freely laterally and vertically at the end that attaches to the tug rather than the aircraft end, which is fixed. The following image shows the tow bar attachment point in Airbus A380.




Image from alamy.com.


The attachment points differ from aircraft to aircraft, so the tow bar basically operates as an adapter between the aircraft and the tug.




"Pins for pushback". Licensed under Public Domain via Commons.

When using a towbarless tug, the nose wheel is simply scooped off the ground using hydraulic (for large aircraft) or electric power. The tug has a movable arm, which is opened and the tug is moved and placed so that the nose wheel fits inside the fixed arms of the tug. The movable arm is then closed. The movable arm and the opposite side has sloping edges, over which the wheels slide and the nose is lifted off as the arm closes due to hydraulic power. 

This video shows how its done in case of Airbus A380.


                
            

Video from Youtube: How to lift up the world's largest commercial aircraft the Airbus A380. by user Kasavubu 

The nose wheel dimensions and aircraft weight do matter and tugs are certified for different ramp weights.