It is part of an Attack action
Jeremy Crawford, official 5e rules designer, answers this question here:
When using the special ability of Javelin of Lightning does the attack have disadvantage if target is outside normal range for a standard javelin rwa? Is this ability part of an Attack Action or some kind of magic item activation? RAI>RAW if they differ.
The attack portion of the javelin of lightning follows the normal rules for an attack with a javelin, and it can be done as part of the Attack action.
In short, it's a single attack within the Attack action, and follows the corresponding rules. Essentially, you throw it as you would any javelin as part of an Attack action, you potentially speak its command word to transform it into a bolt of lightning as it flies through the air, and then it turns back into a javelin as it hits the target (doing extra damage if you activated its special ability).
This magic javelin's description does note: "The javelin's property can't be used again until the next dawn." So if you had multiple javelins of lightning somehow and you had the Extra Attack feature, you could theoretically throw multiple ones in a single turn, but you'd be using up both javelins' ability to be used in this way for the day. (Not to mention that you'd have to have at least one of the javelins already drawn at the start of the turn, since you'd use your one free object interaction for the turn to draw a javelin.)