Timing can be your reason for being ignored. Do approach a girl if she looks relaxed and shows open body language. Don't approach if she is deeply preoccupied.
Approaching from behind or the front can be a problem. Instead, slowly approach from a side angle so they can see you coming and prepare for your presence.
Make eye contact, it shows confidence and creates a sense of closeness. Show her that You are harmless, have open body language, hands in control. Maintain distance, don't sit too close.
You should know how to start a conversation and what you are going to talk about. Can ask them for advice. Prove You're worth talking to and end a convo at a natural moment.
Making her laugh will help her to feel more relaxed and will encourage her to remember how funny you were when she thinks back on the conversation.