Check the CANbus specification, e.g. on Wikipedia. The signal is pseudo differential, with H/L (or 1/0) levels different from the digital signal of the MCU pins. Therefore you need a transceiver.
If you want to test CAN on board level (without a real CAN network), you can get away without a transceiver, if both nodes in close proximity.
Most CAN peripherals use this for a configurable loop-back mode, were the Tx signal is fed directly back to the Rx signal. Usually for test purposes.
Setting up a larger CAN network is not really trivial, I would suggest an experienced mentor if you want/need to do so.