(In Face Select Mode) Delete the Bottom Face of the Cube and then Delete the top Face of the Cylinder.
If you then can’t connect two Vertices of the Cube and Cylinder, you may have Added the Cylinder in Object Mode, so the Cylinder and Cube are two seperate Objects and can’t be connected.
If so, go into Object Mode, make sure both the Cube and Cylinder are Selected and one of them is the Active Object and then CTRL+J to join them.