We consider secure wireless communications between a source and a destination aided by a multi-antenna relay, in the presence of an eavesdropper. In particular, two cooperation schemes of the relay are explored: cooperative relaying (CR) and cooperative jamming (CJ). We first investigate the transmit weight optimization of CR and CJ, for both cases with and without the eavesdropper's channel state information (ECSI). Then, for the case with ECSI, we derive the conditions under which CR achieves a higher secrecy rate than CJ; for the case without ECSI, we compare the secrecy rates of CR and CJ in high transmit power regimes. Building on this, we propose a novel hybrid scheme in which the relay utilizes both CR and CJ, and study the power allocation of the relay between CR and CJ for maximizing the secrecy rate.