A mi amiga se le ocurren ideas lunáticas como querer darle la vuelta al mundo a pie.My friend comes up with these lunatic ideas like wanting to travel around the world on foot.
This means that the noun can be masculine or feminine, depending on the gender of the noun it refers to (e.g., el doctor, la doctora).