Apostasy is a withdrawal from the saving graces of the Church. Among many Protestant denominations, which believe in an invisible Church of All Believers, that means switching to a church that doesn't share what, from the speaker's perspective, constitutes the essential elements of the faith; merely switching from Lutheran to Methodist is not apostasy, although perhaps switching to Mormon is. To a Catholic, who believes that the Eucharist is in substance the body of Christ, leaving that communion may constitute apostasy. (It may, however, merely constitute schism; the Orthodox, for instance, are not considered apostate.)
For reference, the "great apostasy" of Revelations consists not of people renouncing Christianity, but rather of Christians who are fooled into following a false leader.
That is not the definition used by the Church.
Can. 751 Heresy is the obstinate denial or doubt, after baptism, of a truth which must be believed by divine and catholic faith. Apostasy is the total repudiation of the christian faith. Schism is the withdrawal of submission to the Supreme Pontiff or from communion with the members of the Church subject to him.