Swimming' is the object of the verb 'like'. Although it looks like a verb, it's actually functioning as a noun (some people call it a gerund), cf 'I like candy' or 'I like ponies' . BillJ
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.